summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* libmount: rewrite mnt_table_is_fs_mounted() to be less aggressiveKarel Zak2012-08-242-24/+52
| | | | | | | | | The old implementation always canonicalizes target (mountpoint) path. It's better to postpone this operation until the path is really necessary (usually it's unnecessary), because readlink() on mountpoint may trigger automounts. Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: release++ (v2.22-rc2)Karel Zak2012-08-152-2/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: update v2.22-ReleaseNotesKarel Zak2012-08-151-4/+77
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: update AUTHORS fileKarel Zak2012-08-151-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* po: merge changesKarel Zak2012-08-1526-10415/+13431
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* po: update fr.po (from translationproject.org)David Prévot2012-08-151-7105/+4995Star
|
* build-sys: add -Wmissing-declarations, sort warning optionsKarel Zak2012-08-151-7/+8
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: update build-sys testsKarel Zak2012-08-1514-585/+12Star
| | | | | | | - remove tests programs (no more compiled by default) - add resizepart Signed-off-by: Karel Zak <kzak@redhat.com>
* uuidd: improve systemd unit filesKarel Zak2012-08-151-1/+4
| | | | | | | | - use $usrsbin_execdir - add [Install] section - use long options Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: expand paths at make timeKarel Zak2012-08-156-17/+48
| | | | | | | | | | | | | autoconf docs about *dir variables (e.g bindir): ... A corollary is that you should not use these variables except in makefiles... ...you should not rely on AC_CONFIG_FILES to replace bindir and friends in your shell scripts and other files; instead, let make manage their replacement. Signed-off-by: Karel Zak <kzak@redhat.com>
* column: --separator segfaultsB Watson2012-08-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The --separator and --columns long options in util-linux-2.21.2 and in a git clone from 5 minutes ago, don't work: $ echo foobar | column -s x foobar $ echo foobar | column -c 10 foobar $ echo foobar | column --separator=x column: option '--separator' doesn't allow an argument $ echo foobar | column --separator x Segmentation fault $ echo foobar | column --columns 10 column: bad columns width value: '(null)': Invalid argument $ echo foobar | column --columns=10 column: option '--columns' doesn't allow an argument Looks like a simple case of missing has_arg flag in the "struct option" initialization for these two options. The patch just adds the flag. I haven't done thorough testing of the patched code, but it seems to work OK and it no longer segfaults or tries to dereference a null pointer. Signed-off-by: Karel Zak <kzak@redhat.com>
* lib/sysfs: make sysfs_partno_to_devno better readableBernhard Voelker2012-08-141-7/+9
| | | | Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
* lsblk: add WWN, improve udev supportKarel Zak2012-08-142-17/+37
| | | | | | | | | | | | * read WWN from udev DB * use *_ENC properties from udev DB to get original unmodified strings (otherwise for example blank space is replaced with '_' in ID_FS_LABEL) * always read from udev, libblkid is fallback solution only Signed-off-by: Karel Zak <kzak@redhat.com>
* resizepart: remove debug messageKarel Zak2012-08-141-3/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* resizepart: add new commandKarel Zak2012-08-135-2/+186
| | | | | | | This is a simple wrapper for BLKPG_RESIZE_PARTITION (since kernel 3.6). Co-Author: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* lib/sysfs; add sysfs_partno_to_devno()Karel Zak2012-08-132-4/+54
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lib/mangle: remove unused variableKarel Zak2012-08-131-1/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lib/sysfs: expect p<N> suffix for partitionsKarel Zak2012-08-131-3/+6
| | | | | | | | | | ... so for example lsblk(8) will see partitioned loop devices loop0 7:0 0 80G 0 loop ├─loop0p1 259:0 0 100M 0 loop └─loop0p2 259:1 0 79.9G 0 loop Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: fix unmangle codeKarel Zak2012-08-131-2/+3
| | | | | | | | | | | old version: /mnt/ugly/te\134st\134 -> /mnt/ugly/te\st\134 fixed version: /mnt/ugly/te\134st\134 -> /mnt/ugly/te\st\ Reported-by: Naja Melan <najamelan@autistici.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* dmesg: fix kmsg read if read returns EPIPEMilan Broz2012-08-131-3/+15
| | | | | | | | | | The /dev/kmsg can return EPIPE if current record has beed modified while reading. For init_kmsg, it cause switch to DMESG_METHOD_SYSLOG (which is not expected) and later it can truncate output. Signed-off-by: Milan Broz <mbroz@redhat.com>
* eject: return proper 0/1 from eject_cdrom()Dave Reisner2012-08-131-5/+5
| | | | | | | | main() expects this method to return 0 for failure and 1 for success, as the other eject_*() methods do. Add the missing comparison of ioctl() >= 0 Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* Fix non-Linux buildSamuel Thibault2012-08-133-7/+19
| | | | | | | | | | | | loopdev.c, test_pager, and get_max_number_of_cpus() are linux-specific. get_linux_version will only work on Linux, let's introduce system_supports_ext4_ext2() which assumes that mounting ext2 with ext4 is not supported on non-Linux systems. [kzak@redhat.com: - use #ifdef SYS_sched_getaffinity rather than __linux__] Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: aix: fix warningDavidlohr Bueso2012-08-131-2/+1Star
| | | | | | | Fixes: warning: no previous prototype for ‘aix_nolabel’ Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* lscpu: limit options --all, --online, --offline to parsable and extended outputHeiko Carstens2012-08-132-3/+18
| | | | | | | Passing the --all, --online or --offline options for the output summary doesn't make much sense. It should be limited to the two list output options. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
* lib/tt: always escape '\' to simplify parsing in scriptsKarel Zak2012-08-131-14/+3Star
| | | | | | | | | | | | | | | | | | | The commands echo(1) and printf(1) are usable for escape sequences decoding, for example for x in $(findmnt --noheading --raw --output TARGET); do printf "%b" $x done but it's necessary to escape all '\' chars, otherwise for example \b in foo\bar will be interpreted as backspace. It means that for example findmnt(8) has to use \x5c for the backslash. # findmnt --noheading --raw --output TARGET /dev/sda1 /mnt/ugly/foo\x5cbar Reported-by: Pádraig Brady <P@draigBrady.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* lib/tt: fix \x%02x usageKarel Zak2012-08-081-4/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* include/tt: improve work with non-utf8 charsKarel Zak2012-08-071-9/+23
| | | | | Reported-by: Pádraig Brady <P@draigBrady.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: add files make check generates in gitignoreSami Kerola2012-08-061-0/+4
| | | | | | | | The config/test-driver appears at automake stage, rest after running 'make check'. Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* vipw: make vim writebackup mode workSami Kerola2012-08-061-0/+12
| | | | | | | | | | | | Some editors, such as Vim with 'writebackup' mode enabled, use "atomic save" in which the old file is deleted and a new one with the same name created in its place. The vipw tries to detect if such happen by looking hard temporary file link count, when it is zero reopen temporary file by using it's path. Reported-by: Mantas Mikulėnas <grawity@gmail.com> References: http://www.spinics.net/lists/util-linux-ng/msg06666.html Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: add sys-utils/umount.8 manual pageSami Kerola2012-08-062-1/+176
| | | | | | | | | | The man page is almost exact copy of mount-deprecated/umount.8. This version mentions long options, and has the options in same order as they are mentioned in usage() output. Rest of the minor changes make groff slightly nicer e.g. use .PP instead of empty line for paragraph marker. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: update TODOSami Kerola2012-08-061-9/+0Star
| | | | | | | | | | | | Remove tasks that are done. dmesg: --follow option Reference: 0fd12a9697c2e01e3c2e1e558ff027cd2947ee94 build-sys: recursive build Reference: 8772f8d7eeeb922bccee3376552c59d7148df7b4 Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: ftp server does no longer support util-linux-ngSami Kerola2012-08-067-47/+47
| | | | | | | A symlink was probably removed from ftp://ftp.kernel.org/pub/linux/utils/ Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* lib/tt: count read cells, improve \x?? hex encodingKarel Zak2012-08-061-14/+161
| | | | | | | | | | | | | | | | | | * use wcwidth() to count real number of columns required for multibyte strings * encode control characters with \x?? in raw and export (NAME=data) outputs * use \x?? for controls and non-printable characters in the default outputs * use \x?? to encode already existing hex sequences, for example /mnt/ugly\x20space ---> /mnt/ugly\x5cx20space this is not used in the default output, but in raw/export outputs only (which is designed for scripts). Signed-off-by: Karel Zak <kzak@redhat.com>
* mount: replace control chars in mountpoint nameKarel Zak2012-08-062-8/+27
| | | | | | | | | | For compatibility with coreutils and to avoid complex solutions in mount output mount replaces control characters with '?'. Note that the listing mode in mount(8) is in maintenance mode -- findmnt(8) provides more robust and better solutions. Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: update tests docsKarel Zak2012-08-031-2/+12
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: make compatible with autotoolsKarel Zak2012-08-038-32/+85
| | | | | | | | | | | | | | | | The command 'make check' is called from 'make distcheck' (which is used to generate official util-linux tarballs). It means that tests/ stuff has to be compatible with autotools and differentiate between source and build directories. * remove run-nonroot.sh (merged into run.sh * remove commands.sh.in * all tests and top level run.sh accept --builddir and --srcdir command line options * functions.sh modified to use $top_builddir/tests for output files Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: add tests/run-nonroot.sh to automake fileKarel Zak2012-08-031-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: don't compile lib{mount,blkid} tests when --disable-static specifiedKarel Zak2012-08-024-0/+12
| | | | | | The tests often depend on private (non-API) library functions. Signed-off-by: Karel Zak <kzak@redhat.com>
* wdctl: tiny change to man pageKarel Zak2012-08-021-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* wdctl: add "--settimeout" to set the timeoutHarald Hoyer2012-08-022-10/+79
| | | | | | | [kzak@redhat.com: - fix usage() and man page] Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: Harald Hoyer <harald@redhat.com>
* dmesg: fix kmsg usability detectionKarel Zak2012-08-021-12/+35
| | | | | | | | | On old kernels (<3.5) kernel allows to open read-only /dev/kmsg for root, but read() returns -EINVAL. It means that open() is not enough to detect /dev/kmsg usability. We have to call read() (or epoll). Reported-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add libmount optstr deduplicateKarel Zak2012-08-012-0/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: deduplicate SELinux mount optionsKarel Zak2012-08-011-0/+9
| | | | | | | | | | We already have a clue about SELinux specific mount options in libmount, so it makes sense to deduplicate the options as Linux kernel does not support duplicate SELinux options. (SELinux kernel stuff somehow ignores standard Linux mount conventions...) Requested-by: Niels de Vos <ndevos@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add mnt_optstr_deduplicate_option()Karel Zak2012-08-014-9/+74
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: standardize fdisk headers in MBR testsKarel Zak2012-08-014-26/+29
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: blkid/md-raid1-part failsBernhard Voelker2012-08-011-4/+6
| | | | | | | [kzak@redhat.com: - I forgot to apply this part of the Bernhard's patch] Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de> Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: cleanup ts_is_mountedBernhard Voelker2012-07-311-3/+0Star
| | | | | | | * tests/functions.sh (ts_is_mounted): Remove check for canonicalization failure again, because it is now done by ts_canonicalize. Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
* tests: make blkid/md-raid1-part more robustBernhard Voelker2012-07-311-6/+6
| | | | | | | | | | | * tests/expected/blkid/mk-raid1-part: Replace major and minor number of ID_PART_ENTRY_DISK by a special string. Add ID_FS_UUID and ID_FS_UUID_ENC again, also with a special string. * tests/ts/blkid/md-raid1-part: Before comparing the expected output with the actual output, replace the values of ID_PART_ENTRY_DISK, ID_FS_UUID and ID_FS_UUID_ENC with the speacial strings mentioned above. Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
* tests: add non-dos mode fdisk testKarel Zak2012-07-312-0/+330
|
* build-sys: use slash for binaries in gitignoreKarel Zak2012-07-311-109/+107Star
| | | | | | | .. otherwise git interprets binaries names as shell blog and apply the pattern globally. Signed-off-by: Karel Zak <kzak@redhat.com>