summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* lib/pager: fix compiler warningsKarel Zak2012-04-231-4/+2Star
| | | | | | | | | | | pager.c: In function ‘start_command’: pager.c:82:7: warning: unused variable ‘err’ [-Wunused-variable] pager.c:49:25: warning: unused variable ‘fderr’ [-Wunused-variable] pager.c:49:15: warning: unused variable ‘fdout’ [-Wunused-variable] pager.c:48:25: warning: unused variable ‘need_err’ [-Wunused-variable] pager.c:48:15: warning: unused variable ‘need_out’ [-Wunused-variable] Signed-off-by: Karel Zak <kzak@redhat.com>
* lib: add pager functionalityDavidlohr Bueso2012-04-233-0/+222
| | | | | | | | | When some program' output exceeds the terminal's dimensions, it is a nice feature to call a pager that acts as calling 'less' to allow better user navigation. This patch adds this functionality, based on what perf and git have (ie: git log). Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* namei: fix relative symlinks evaluationKarel Zak2012-04-201-3/+10
| | | | | | | | | | | | | Fedora 17 (/bin is symlink to /usr/bin): [root@intel ~]# /bin/namei /bin/namei f: /bin/namei d / l bin -> usr/bin usr - No such file or directory Reported-by: Jan Stancek <jstancek@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: move fstab.5 to sys-utils (mount/ dir is deprecated)Karel Zak2012-04-193-5/+14
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* swapon: add support for PARTUUID= and PARTLABEL=Karel Zak2012-04-191-5/+7
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mount: (new) add support for PARTUUID= and PARTLABEL=Karel Zak2012-04-192-7/+16
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lsblk: add support for PARTUUID= and PARTLABEL=Karel Zak2012-04-191-6/+39
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* findmnt: add support for PARTUUID= and PARTLABEL=Karel Zak2012-04-192-26/+24Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* blkid: add docs about PARTUUID= and PARTLABEL=Karel Zak2012-04-191-4/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add support for PARTUUID= and PARTLABEL=Karel Zak2012-04-191-2/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: add support for PARTUUID= and PARTLABEL=Karel Zak2012-04-193-1/+22
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: tiny change in output headerKarel Zak2012-04-181-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: remove LD_LIBRARY_PATH from swapon testsKarel Zak2012-04-187-34/+12Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* swapon: minor coding style changesKarel Zak2012-04-181-32/+23Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* swapon: cleanup usage()Karel Zak2012-04-181-54/+52Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* swapon: cleanup main()Karel Zak2012-04-181-32/+16Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* swapoff: cleanup usage() and includesKarel Zak2012-04-181-24/+17Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mount: fix man page typo s/reatime/relatime/Karel Zak2012-04-182-2/+2
| | | | | Reported-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* swapoff: use libmount to parse fstabKarel Zak2012-04-182-53/+41Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* swapoff: move code from swapon.c to swapoff.cKarel Zak2012-04-184-170/+222
| | | | | | | | | * multipurpose binaries (symlinks) suck when used with autotools * swapoff shares small subset of the code with swapon * usage() and 'struct option' is unnecessary complex when shared * shorter and simple code is easer to maintain... Signed-off-by: Karel Zak <kzak@redhat.com>
* swapon: move generic code to swapon-common.cKarel Zak2012-04-184-86/+154
| | | | | | This will allow to use separate binary for swapon and swapoff. Signed-off-by: Karel Zak <kzak@redhat.com>
* swapon: use libmount for fstab parsing (for swapon --all)Karel Zak2012-04-181-41/+51
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mount: (new) be more pedantic about --make-*Karel Zak2012-04-182-11/+31
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add mnt_context_get_options()Karel Zak2012-04-184-2/+24
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* swapon: use only libmount for paths/tags evealuationKarel Zak2012-04-172-20/+12Star
| | | | | | | libmount provides very simple API for paths and tags canonicalizations, let's use it, rather directly link to libblkid and lib/canonicalize.c. Signed-off-by: Karel Zak <kzak@redhat.com>
* swapon: use libmount for /proc/swaps parsingKarel Zak2012-04-172-101/+67Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mount: (new) improve error messagesKarel Zak2012-04-171-8/+7Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add mnt_context_fstab_applied()Karel Zak2012-04-174-1/+16
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* wdctl: add watchdog status toolLennart Poettering2012-04-163-1/+183
| | | | | | | | | | | | For: util-linux This patch adds a tiny tool "wdctl" which may be used to query the status of Linux watchdog devices (/dev/watchdog). This will simply query all fields that may be queried from the device and print them nicely formatted. Signed-off-by: Lennart Poettering <lennart@poettering.net>
* cal: Fix building under uClibc.James Le Cuirot2012-04-161-1/+1
| | | | | | Commit fbc333fec09394bf4e47707de08a65e8c0e9c288 broke building under uClibc because HAVE_DECL macros are set to 0, not undefined. Signed-off-by: James Le Cuirot <chewi@aura-online.co.uk>
* fdisk: remove unused fileKarel Zak2012-04-112-135/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* login-utils: add missing header, fix setpwnam.c fclose logicKarel Zak2012-04-112-1/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'close_stream' of git://github.com/kerolasa/lelux-utiliteetitKarel Zak2012-04-11102-48/+278
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'close_stream' of git://github.com/kerolasa/lelux-utiliteetit: disk-utils: verify writing to streams was successful fdisk: verify writing to streams was successful getopt: verify writing to streams was successful hwclock: verify writing to streams was successful login-utils: verify writing to streams was successful misc-utils: verify writing to streams was successful mount: verify writing to streams was successful partx: verify writing to streams was successful schedutils: verify writing to streams was successful sys-utils: verify writing to streams was successful term-utils: verify writing to streams was successful text-utils: verify writing to streams was successful include: add stream error checking facility Conflicts: fdisk/fdisk.c
| * disk-utils: verify writing to streams was successfulSami Kerola2012-04-0414-0/+28
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * fdisk: verify writing to streams was successfulSami Kerola2012-04-045-0/+11
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * getopt: verify writing to streams was successfulSami Kerola2012-04-041-0/+2
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * hwclock: verify writing to streams was successfulSami Kerola2012-04-041-2/+5
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * login-utils: verify writing to streams was successfulSami Kerola2012-04-049-6/+20
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * misc-utils: verify writing to streams was successfulSami Kerola2012-04-0417-8/+35
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * mount: verify writing to streams was successfulSami Kerola2012-04-043-2/+8
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * partx: verify writing to streams was successfulSami Kerola2012-04-041-0/+2
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * schedutils: verify writing to streams was successfulSami Kerola2012-04-043-1/+6
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * sys-utils: verify writing to streams was successfulSami Kerola2012-04-0429-2/+60
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * term-utils: verify writing to streams was successfulSami Kerola2012-04-047-7/+30
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * text-utils: verify writing to streams was successfulSami Kerola2012-04-0410-20/+29
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * include: add stream error checking facilitySami Kerola2012-04-042-0/+42
| | | | | | | | | | | | | | | | | | The close_stream() is copied from GNU lib. Inspiration to do this is talk by Jim Meyering - Goodbye World! The perils of relying on output streams in C. Reference: http://www.irill.org/events/ghm-gnu-hackers-meeting/videos/jim-meyering-goodbye-world-the-perils-of-relying-on-output-streams-in-c Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | libuuid: use randutilsDavidlohr Bueso2012-04-102-95/+7Star
| | | | | | | | Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* | fdisk: use randutils for mbr signature creationDavidlohr Bueso2012-04-102-46/+6Star
| | | | | | | | Signed-off-by: Davidlohr Bueso <dave@gnu.org>
* | lib: random utilitiesDavidlohr Bueso2012-04-103-0/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a random number(s) generator specific file. The intial functions are based on what libuuid provide. I did some modifications like avoid WIN32 checks - this is util-LINUX. [kzak@redhat.com: - move jrand_seed to lib/randutils.c - use TLS for jrand_seed (like original code from libuuid) - use size_t for buffer sizes - add close() to random_get_bytes] Signed-off-by: Davidlohr Bueso <dave@gnu.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* | lib/blkdev: fix compiler warning [-Wreturn-type]Karel Zak2012-04-101-1/+3
| | | | | | | | | | | | | | ../lib/blkdev.c: In function ‘blkdev_get_geometry’: ../lib/blkdev.c:287:1: warning: control reaches end of non-void function [-Wreturn-type] Signed-off-by: Karel Zak <kzak@redhat.com>