On 24.04.2012 01:34, Samuel Thibault wrote: > + if (errno == ENOENT && part >= 5) > + { This introduces an assumption that if part >=5 is missing then there are no additional partitions. While this is true for msdos, it's false for GPT, where such config is common after deleting a partition. Moreover, APM (apple) partitions often start at 8. -- Regards Vladimir 'φ-coder/phcoder' Serbinenko