This patch restores the original fdisk behavior and always prints
information about misaligned partitions in 'p'print output.
Signed-off-by: Karel Zak <kzak@redhat.com>
This is probably correct to have curs_set() in ui_end(), but according
to Martin it does not work with slang library from signal handler.
Reported-by: Martin Steigerwald <Martin@lichtvoll.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit introduces a support for user configurable
from/to track and a basic repair mode for broken floppies.
It also fixes a recently introduced bug that causes
a line breakage when printing the track number.
Signed-off-by: Karel Zak <kzak@redhat.com>
This fixes the following compiler warning.
disk-utils/swaplabel.c:175:2: warning: implicit declaration of function
'get_swap_prober' [-Wimplicit-function-declaration]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
* don't use err(), but warn(), so don't stop after the first error
* display all errors when "-l <device> ..." specified
* display only EACCES errors when list whole disks from
/proc/partitions ("fdisk -l" )
Reported-by: Boian Bonev <bbonev@ipacct.com>
Addresses: https://github.com/karelzak/util-linux/pull/106
Signed-off-by: Karel Zak <kzak@redhat.com>
The xiafs filesystem was removed from the kernel fifteen years ago,
and any kernel that contained it reached end of life ten years ago.
It's time to stop mentioning it in the mount man page and elsewhere.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
After quitting cfdisk (built with slang) the cursor would be
missing at the command prompt.
Reported-by: Martin Steigerwald <Martin@Lichtvoll.de>
Addresses-Debian-Bug: #755991
Signed-off-by: Andreas Henriksson <andreas@fatal.se>
Fixing plain typos, miswordings, inconsistent periods, some missing
angular brackets, and a proper pluralization (even when it involves
a constant, because for some languages the precise value matters).
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
The swapon(8) listing was almost complete, apart from label and uuid.
This change moves the code from swaplabel(8) to shared scope to be used
for printouts in other swap commands, such as swapon.
Adding this feature to lsblk(8) was a consideration, but lsblk is not
interested of swapfiles, so the swapon seems like a better option to add
this information.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
... this allows to avoid unnecessary sync() from cfdisk.
Reported-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
From manual page; 'On error, the value MAP_FAILED is returned, and errno
is set appropriately'.
Reference: http://man7.org/linux/man-pages/man2/mmap.2.html
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
BSD is nested within DOS partition, so for disk without any partition
table it does not make any sense to offer BSD label.
Signed-off-by: Karel Zak <kzak@redhat.com>
It seems overkill to lock directly whole-disk device (for -l) when we use the
lock only to synchronize fsck instances.
It's fsck private business, so don't use system files, but let's use private
/run/fsck/<diskname>.lock file.
Addresses: https://bugs.freedesktop.org/show_bug.cgi?id=79576
Signed-off-by: Karel Zak <kzak@redhat.com>
Sometimes we use "behaviour" and "behavior" in the same text, let's
use "behavior" only everywhere.
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1011068
Signed-off-by: Karel Zak <kzak@redhat.com>
Most of them catched on 32bit gcc and icc.
disk-utils/fsck.cramfs.c: printf format type
lib/boottime.c: unused variables
misc-utils/cal.c: set but never used
sys-utils/losetup.c: set but never used
sys-utils/lscpu-dmi.c: defined but not used
sys-utils/switch_root.c: comparison between signed and unsigned
tests/helpers/test_sysinfo.c: printf format type
Sfdisk prints out a warning about extended partition not
starting at a cylinder boundary. Since this is irrelevant
for linux, the -L option should suppress this warning.
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>