[parted-devel] Queries/doubts regarding linux_swap.c

Otavio Salvador otavio at debian.org
Mon Nov 20 20:06:12 CET 2006


David Cantrell <dcantrell at redhat.com> writes:

>> 1. libparted/fs/linux_swap/linux_swap, lines 42-69: The structure of
>> the swap header as a union of SwapOldHeader and SwapNewHeader is not
>> the same as defined in the vanilla Linux 2.6.18.2 kernel. Ref:
>> include/linux/swap.h, lines 52-67. Is SwapOldHeader defined the way it
>> is, because of the difficulty in knowing the page size while defining
>> the structure or for some other reason? Why were the sws_uuid and
>> sws_volume fields left out in SwapNewHeader?
<...>
> We never use these in libparted, but there's no harm in syncing up the
> definitions to match current standards.  We should not directly
> include swap.h because including kernel headers in userspace code is
> deemed bad by kernel developers at the moment.  This is fine as it
> gives them more control over those headers.  It presents problems for
> applications like parted that do need those things.  The stop gap is
> to duplicate the definition in our code.

Right but then would be better to just copy their header somewhere so
will be easier to us sync with them from time to time.

-- 
        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 gives you Windows ... Linux gives
 you the whole house."



More information about the parted-devel mailing list