[parted-devel] [PATCH] Properly sync partitions with operating system
Jim Meyering
jim at meyering.net
Thu Mar 5 15:04:32 UTC 2009
Joel Granados Moreno wrote:
> * include/parted/disk.h : Added headers for new function.
> * libparted/disk.c (ped_disk_get_max_supported_partition_count): New
> function that calls the label specific function.
> * libparted/arch/linux.c (_disk_sync_part_table): To sync the table in
> disk with the kernel we remove all partitions from the kernel table
> and then add the ones that are in disk. For this to happen we need to
> calculate the maximum number of supported partitions in the label.
> * libparted/labels/gpt.c (gpt_get_max_supported_partition_count): We
> read the gpt header from disk and calculate the maximum amount of
> partitions that the label can hold.
> * libparted/labels/aix.c: new get_max_supported_partition_count function.
> * libparted/labels/bsd.c: likewise
> * libparted/labels/dasd.c: likewise
> * libparted/labels/dos.c: likewise
> * libparted/labels/dvh.c: likewise
> * libparted/labels/gpt.c: likewise
> * libparted/labels/loop.c: likewise
> * libparted/labels/mac.c: likewise
> * libparted/labels/pc98.c: likewise
> * libparted/labels/rdb.c: likewise
> * libparted/labels/sun.c: likewise
Thanks for your patience, Joel.
I've pushed the above with minor changes to the log message,
and then made three additional changes, included below.
BTW, do you use emacs? If so, you can add this to your .emacs
file so it'll be handled automatically:
(add-hook 'before-save-hook 'copyright-update)
I'll bet vim has something similar.
Jim
More information about the parted-devel
mailing list