]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libfdisk: change the way how apply user device properties
authorKarel Zak <kzak@redhat.com>
Fri, 13 Jan 2017 11:44:35 +0000 (12:44 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 13 Jan 2017 11:56:10 +0000 (12:56 +0100)
commit502dd53c864c26124146eb42eb9bbf5bb7b587b9
tree74d3da7f6b363094c2b2755e62d57929aab01565
parente86c73164fccf600802612bc033128bcef305341
libfdisk: change the way how apply user device properties

The current code calls fdisk_apply_user_device_properties() after
label probing, because we want to overwrite label geometry by user
settings (e.g. -C -H -S fdisk options).

Unfortunately, this way does not work if we need to use a different
sector size, because label probing depends on sector size... So, the
right way is to apply user setting to the fdisk context before we
start to read from device, and overwrite geometry again after label is
already read. Fortunately, this shit is necessary only rarely and for
SUN and SGI disk labels.

Addresses: https://github.com/karelzak/util-linux/issues/396
Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk/src/alignment.c
libfdisk/src/bsd.c
libfdisk/src/context.c
libfdisk/src/dos.c
libfdisk/src/fdiskP.h
libfdisk/src/sun.c