diff options
author | Karel Zak | 2013-05-24 11:48:58 +0200 |
---|---|---|
committer | Karel Zak | 2013-09-16 16:46:57 +0200 |
commit | 1653f0b0c2e825f53f0ad067967a6cd696b95227 (patch) | |
tree | a68899b2d725e096f90733de0c9890c8650b20aa /libfdisk/src/libfdisk.h | |
parent | fdisk: (sgi) remove printf from code (diff) | |
download | kernel-qcow2-util-linux-1653f0b0c2e825f53f0ad067967a6cd696b95227.tar.gz kernel-qcow2-util-linux-1653f0b0c2e825f53f0ad067967a6cd696b95227.tar.xz kernel-qcow2-util-linux-1653f0b0c2e825f53f0ad067967a6cd696b95227.zip |
libfdisk: make it possible to reset device properties
- remember user C/H/S and sector size
- reset all device properties before create a new label (maybe the
old setting has been affected by previous on-disk label)
- always apply user setting after the reset
- improve topology/geometry debug messages
Note that for fdisk "user C/H/S and sector size" means on command line
specified values. If you override the setting by c/h/s commands in
expert menu then the setting is applied to the current disk label
only. If you create a new disk label (e.g change MBR to GPT) then
fdisk will use the original setting.
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libfdisk/src/libfdisk.h')
-rw-r--r-- | libfdisk/src/libfdisk.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libfdisk/src/libfdisk.h b/libfdisk/src/libfdisk.h index fc38ef770..3832af070 100644 --- a/libfdisk/src/libfdisk.h +++ b/libfdisk/src/libfdisk.h @@ -136,6 +136,16 @@ extern int fdisk_partition_toggle_flag(struct fdisk_context *cxt, size_t partnum /* alignment.c */ extern int fdisk_reset_alignment(struct fdisk_context *cxt); +extern int fdisk_reset_device_properties(struct fdisk_context *cxt); + +extern int fdisk_save_user_geometry(struct fdisk_context *cxt, + unsigned int cylinders, + unsigned int heads, + unsigned int sectors); + +extern int fdisk_save_user_sector_size(struct fdisk_context *cxt, + unsigned int phy, + unsigned int log); /* dos.c */ |