[parted-devel] Queries/doubts regarding linux_swap.c
Debarshi 'Rishi' Ray
debarshi.ray at gmail.com
Sun Nov 19 20:21:31 CET 2006
I have a few queries/doubts regarding the linux-swap code in Parted
1.8.0. It would be very helpful if some of you could help me a bit
regarding this.
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?
2. libparted/fs/linux_swap/linux_swap.h, lines 204-247: The function
swap_open calls swap_alloc, swap_init and ped_geometry read. Now
swap_init already does make an identical call to ped_geometry_read. If
swap_init could return the status of ped_geometry_read instead of a
void, then this second call to ped_geometry_read can be done away
with. Am I correct?
I have a couple more, but I guess it would better if I got these
clarified before moving on to the rest.
Happy hacking,
Debarshi
--
Computers are like air conditioners -- they stop working properly if
you open Windows.
More information about the parted-devel
mailing list