]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libfdisk: make it possible to reset device properties
authorKarel Zak <kzak@redhat.com>
Fri, 24 May 2013 09:48:58 +0000 (11:48 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 16 Sep 2013 14:46:57 +0000 (16:46 +0200)
commit1653f0b0c2e825f53f0ad067967a6cd696b95227
treea68899b2d725e096f90733de0c9890c8650b20aa
parent533b9b2dbe7d1eacd2f1a3b62c3fd28403633852
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>
fdisks/fdisk.c
libfdisk/src/alignment.c
libfdisk/src/context.c
libfdisk/src/fdiskP.h
libfdisk/src/label.c
libfdisk/src/libfdisk.h