summaryrefslogtreecommitdiffstats
path: root/fdisk/fdisksunlabel.h
Commit message (Collapse)AuthorAgeFilesLines
* fdisk: check returns in fdisk from partition changesMike Frysinger2007-07-161-1/+1
| | | | | | | | | currently the code in fdisk which changes partition types is a bit fragile ... it assumes the partition type succeeded instead of checking the user input or for errors. ive tweaked the sub functions to return a value indicative of the functions' success and fdisk now checks/reports based on that. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* fdisk: many significant improvements and fixes to Sun label handlingDavid Miller2007-07-021-40/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) Properly describe the exact layout and fields of the sun disk label. Several fields were incorrectly mentioned and others wrongly sized. 2) Properly set the version, sane, and num_partitions fields. Because we weren't doing this, programs such as Solaris's format and the Solaris kernel itself refused to recognize our disk labels as valid. 3) Move SSWAP*() macros into fdisksunlabel.c as there is no reason for them to be exposed to the rest of fdisk. 4) Kill the sun_predefined_drives array hack and assosciated code. Instead size the disk and figure out the geometry properly just like the SGI and MSDOS partition handling do, by means of the HD_GETGEO ioctl() and disksize(). 5) If the disk label read is found to not have the proper values set in version, sane, or num_partitions, fix them, recompute the label checksum, dirty the disk label, and let the user know what we did and that the fixed values will be written out if they 'w'. This gives users an easy way to fix up disk labels created by disk labelling programs which had this bug. 6) Create a sun_sys_getid() function so that fdisk.c does not need to reference the sun disk label details directly, just like the SGI code does. Signed-off-by: David S. Miller <davem@davemloft.net>
* fdisk: move duplicate stuff from fdisk*label.h to fdisk.hKarel Zak2007-06-271-13/+4Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: use unsigned long long instead int for sectorsKarel Zak2007-05-311-2/+3
| | | | | | The patch is originally based on an old Suse patch. Signed-off-by: Karel Zak <kzak@redhat.com>
* Imported from util-linux-2.12 tarball.Karel Zak2006-12-071-1/+1
|
* Imported from util-linux-2.10s tarball.Karel Zak2006-12-071-1/+1
|
* Imported from util-linux-2.10m tarball.Karel Zak2006-12-071-3/+4
|
* Imported from util-linux-2.9v tarball.Karel Zak2006-12-071-2/+0Star
|
* Imported from util-linux-2.9i tarball.Karel Zak2006-12-071-0/+74