[syslinux] [PATCH 00/05] Mending for mkdiskimage

H. Peter Anvin hpa at zytor.com
Fri Jul 11 14:34:55 PDT 2014


On 07/11/2014 12:33 AM, Thomas Schmitt wrote:
> Technical side note:
> It turned out that the lseek(2) function of NetBSD does not work
> with SEEK_END as expected from the manual. libburn had to resort
> to a binary search with try-and-error to determine device sizes.
> I did not check perl's sysseek() whether it suffers from the
> lseek(2) shortcomming, but i would expect so.
> It might be desirable to have an option for explicitely setting
> a device size.

Perl sysseek() is just a wrapper around lseek(2).

However, there is such an option already... if you specify cylinder
count or, with the -M option, megabyte count.

> 5/5 is indeed quite obscure. How about this:
> 
>   Unclaimed space may remain after the end of the partition if the
>   partition size stems from option -M, or is computed from arguments
>   h and s because argument c is 0.
>   Especially on device files, such space might contain a backup GPT
>   which would be invalid after mkdiskimage but could lure partition
>   editors into restoring the outdated main GPT.
>   This change overwrites the space between partition end and image
>   file end by zeros, unless option -s is given. (-s shall prevent
>   zeroization in general.)

I have concerns about this, especially in the light of the above.  I
wouldn't want it to be the default at least.

	-hpa



More information about the Syslinux mailing list