[parted-devel] [PATCH] More correct handling of the HeaderSize field in GPT labels

Matthew S. Harris mharris312 at gmail.com
Sun Jul 8 21:11:05 UTC 2007


In general, if there end up being multiple, backwards-compatible
versions of the EFI spec, then Parted should be able to operate on the
set of headers it knows about and ignore the rest.

In this case, the EFI spec shows a table of the fields in the header,
and it includes as the last "field" all the remaining space in the
block.  OpenSolaris interprets this to mean that HeaderSize is the
size of the block; Parted obviously does not.  This is significant
because the CRC of the header is supposed to be of HeaderSize bytes.
That's why this change is needed.

Thanks for looking at it so quickly.


Matthew

On 7/8/07, Otavio Salvador <otavio at debian.org> wrote:
> "Matthew S. Harris" <mharris312 at gmail.com> writes:
>
> > - Don't abort if the HeaderSize field value is bigger than our struct,
> > since more fields may be defined in the future.
>
> This, IMHO isn't right.
>
> I personally prefer to exit and warn user that we aborted due a header
> size issue then just ignore it.
>
> Others?
>
> --
>         O T A V I O    S A L V A D O R
> ---------------------------------------------
>  E-mail: otavio at debian.org      UIN: 5906116
>  GNU/Linux User: 239058     GPG ID: 49A5F855
>  Home Page: http://otavio.ossystems.com.br
> ---------------------------------------------
> "Microsoft sells you Windows ... Linux gives
>  you the whole house."
>



More information about the parted-devel mailing list