For example BSD uses letters rather tahn numbers to address partition,
the fist partition is 'a', last partition is 'p'.
Signed-off-by: Karel Zak <kzak@redhat.com>
- all label prober() function in fdisk_new_nested_context()
- don't reset device properties for nested contexts
Signed-off-by: Karel Zak <kzak@redhat.com>
- 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>
- move fdisk_sun_set_* functions to public API file
- remove extra function to set ncyl -- this has to follow regular
geo.cylinders
- set alternative cylinders to zero (to be compatible with parted)
- it seems that the previous code completely ignored relation between
geo.cylinders, sunlabel->acyl and sunlabel->ncyl.
Signed-off-by: Karel Zak <kzak@redhat.com>
Currently we use private libfdisk in fdisk code, because the library
API is not stable yet. Let's add debug flag to make it obvious in the
debug output what is from libfdisk and what is from fdisk frontend.
Signed-off-by: Karel Zak <kzak@redhat.com>
# fdisk /dev/sda
Welcome to fdisk (util-linux 2.23).
[...]
Command (m for help): a
Segmentation fault (core dumped)
It's too fragile, the va_list implementation is architecture specific
and it seems we need such thing in libfdisk at all.
Reported-by: "Gabor Z. Papp" <gzp@papp.hu>
Signed-off-by: Karel Zak <kzak@redhat.com>
disk-utils/fsck.minix.c:511:9: warning: mixing declarations and code
fdisks/sfdisk.c:982:5: warning: mixing declarations and code
fdisks/sfdisk.c:1254:5: warning: mixing declarations and code
fdisks/sfdisk.c:1564:5: warning: mixing declarations and code
lib/mbsalign.c:279:7: warning: mixing declarations and code
libblkid/src/devname.c:378:17: warning: mixing declarations and code
libfdisk/src/alignment.c:219:9: warning: mixing declarations and code
term-utils/wall.c:111:9: warning: mixing declarations and code
text-utils/col.c:418:19: warning: non-ANSI function declaration of function 'flush_blanks'
text-utils/col.c:553:12: warning: non-ANSI function declaration of function 'alloc_line'
text-utils/rev.c:105:9: warning: mixing declarations and code
text-utils/tailf.c:245:9: warning: mixing declarations and code
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
The whole AIX support in fdisk has been limited to pretty poor AIX
magic string detection and warning that the AIX is unsupported. It's
too expensive to maintain such fdisk driver.
Signed-off-by: Karel Zak <kzak@redhat.com>