summaryrefslogtreecommitdiffstats
path: root/disk-utils
Commit message (Collapse)AuthorAgeFilesLines
* fdisk: fix -l [<device>]Karel Zak2014-07-281-5/+8
| | | | | | | | | | | | | * 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>
* sfdisk: use pluralized translation.Lauri Nurmi2014-07-281-1/+2
|
* various: erase all traces of the long-obsolete xiafsBenno Schulenberg2014-07-283-5/+2Star
| | | | | | | | 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>
* cfdisk: reenable cursor when quittingAndreas Henriksson2014-07-281-0/+1
| | | | | | | | | 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>
* textual: fix some typos and inconsistencies in various messagesBenno Schulenberg2014-07-233-5/+5
| | | | | | | | 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>
* swapon: share get_swap_prober() with swaplabel to print uuid and labelSami Kerola2014-07-222-49/+3Star
| | | | | | | | | | | | 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>
* cfdisk: actually translate the partition types in the menuBenno Schulenberg2014-07-211-2/+2
| | | | | | | [kzak@redhat.com: - translate also GPT types] Signed-off-by: Benno Schulenberg <bensberg@justemail.net> Signed-off-by: Karel Zak <kzak@redhat.com>
* cfdisk: use /dev/sda by defaultKarel Zak2014-07-181-6/+20
| | | | | | .. this all is for backward compatibility. Signed-off-by: Karel Zak <kzak@redhat.com>
* cfdisk: make code more readable for analyzers [coverity scan]Karel Zak2014-07-171-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* cfdisk: fix possible memory leak [coverity scan]Karel Zak2014-07-171-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* cfdisk: restore the license that was lost in JanuaryBenno Schulenberg2014-07-151-0/+14
| | | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net> Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: improve wording and formatting of the man page of cfdiskBenno Schulenberg2014-07-151-37/+45
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* cfdisk: fix warning usage, improve 's' helpKarel Zak2014-07-151-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* cfdisk: accept 's' as well as 'S' for sectorsKarel Zak2014-07-151-1/+1
| | | | | Reported-by: Benno Schulenberg <bensberg@justemail.net> Signed-off-by: Karel Zak <kzak@redhat.com>
* cfdisk: make menus sensitive to ESCKarel Zak2014-07-151-0/+2
| | | | | Reported-by: Benno Schulenberg <bensberg@justemail.net> Signed-off-by: Karel Zak <kzak@redhat.com>
* cfdisk: use \n for messages on stdout and stderrKarel Zak2014-07-151-4/+13
| | | | | Reported-by: Benno Schulenberg <bensberg@justemail.net> Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: make disk sync() optionalKarel Zak2014-07-152-2/+5
| | | | | | | ... this allows to avoid unnecessary sync() from cfdisk. Reported-by: Benno Schulenberg <bensberg@justemail.net> Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: avoid code duplicationSami Kerola2014-07-131-5/+4Star
| | | | | | | To me having call to close() twice is less readable than one new variable. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* mkfs.cramfs: use defined failure name rather than magic valueSami Kerola2014-07-131-4/+2Star
| | | | | | | | 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>
* fdformat: match variable and print format typesSami Kerola2014-07-131-2/+2
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* cfdisk: add braces to ensure operation orderSami Kerola2014-07-131-1/+1
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* fsck: uninitialized argument value [clang-analyze]Karel Zak2014-07-011-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* cfdisk: fix division by zero [clang-analyze]Karel Zak2014-07-011-0/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: don't use --geom-* prefix for CHS optionsKarel Zak2014-06-302-9/+9
| | | | | | | We already use --cylinders, --heads and --sectors for sfdisk, let's make new fdisk option compatible. Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: add long options, cleanup man page and usage()Karel Zak2014-06-252-61/+88
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* cfdisk: add --zero command line optionKarel Zak2014-06-202-3/+13
| | | | | | | The option has been supported by previous versions, we can easily support it too. Signed-off-by: Karel Zak <kzak@redhat.com>
* cfdisk: don't offer BSDKarel Zak2014-06-201-4/+4
| | | | | | | 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>
* build-sys: remove obsolete wholedisk.cKarel Zak2014-06-171-1/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* sfdisk: use sysfs_devno_is_wholedisk()Karel Zak2014-06-171-18/+30
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: use sysfs_devno_is_wholedisk()Karel Zak2014-06-171-13/+19
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fsck: use private lock file rather than whole-disk directlyKarel Zak2014-06-093-19/+58
| | | | | | | | | | | 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>
* lib/fileutils: add mkdir_p() from libmountKarel Zak2014-06-091-1/+1
|
* libsmartcols: add debug messagesKarel Zak2014-06-062-0/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: fix "behaviour" vs. "behavior"Karel Zak2014-06-061-1/+1
| | | | | | | | 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>
* cfdisk: resize UI on SIGWINCHKarel Zak2014-06-051-7/+103
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* cfdisk: add [Sort] operationKarel Zak2014-06-051-2/+16
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build: fix some compiler warningsRuediger Meier2014-05-301-2/+2
| | | | | | | | | | | | 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: suppress Linux-irrelevant warnings with -LPetr Uzel2014-05-271-1/+1
| | | | | | | | 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>
* build-sys: add BUILD_{SFDISK,BLOCKDEV,MKSWAP,IOSIZE,MKFS}Karel Zak2014-05-211-3/+13
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: add --disable-minixKarel Zak2014-05-211-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fsck.cramfs: cleanup usage() and warning messagesKarel Zak2014-05-201-7/+5Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mkfs.cramfs: fix crash when -b 0Ruediger Meier2014-05-191-2/+4
| | | | | | | Now -b 0 gives us the default (page size) like we do it in fsck.cramfs. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* fsck.cramfs: update man page (--extract and --blocksize)Ruediger Meier2014-05-191-5/+9
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: remove test_fsck.cramfs (reverts 6c32ae78)Ruediger Meier2014-05-191-5/+0Star
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* fsck.cramfs: remove define INCLUDE_FS_TESTSRuediger Meier2014-05-191-24/+5Star
| | | | | | | There is only one non-trivial issue where we now print a warning instead of exit error. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* fsck.cramfs: refactor option -x/--extractRuediger Meier2014-05-191-14/+17
| | | | | | | | | | | | | | | | | We want to clean it up to compile it later per default (not only if defined INCLUDE_FS_TESTS). - Rename option --destination to --extract. - DIR argument is now optional because we want to keep the use case "test uncompression without writing files" ... but we don't want it always. - Remove shortopt -x because shortopts with optional args are evil. Changing the cmd interface is no compatibility issue here because all affected options errored out per default in past. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* fsck.cramfs: add option --blocksizeRuediger Meier2014-05-191-3/+12
| | | | | | .. similar to mkfs.cramfs Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* fsck.cramfs: rename variable page_size to blksizeRuediger Meier2014-05-191-11/+11
| | | | | | ... similar to mkfs.cramfs.c Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* fsck.cramfs: ifdef unused outbuffer and page_sizeRuediger Meier2014-05-191-5/+4Star
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* fsck.cramfs: allow smaller superblock sizesRuediger Meier2014-05-191-1/+2
| | | | | | | | | | We are already fine with checking for different endianess. Now we also succeed if systems's page size does not match. Note that page_size is only really used if INCLUDE_FS_TESTS is defined, see followups. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>