summaryrefslogtreecommitdiffstats
path: root/misc-utils
Commit message (Collapse)AuthorAgeFilesLines
* getopt: fix normalize() usage [coverity scan]Karel Zak2013-03-271-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lsblk: check returns [coverity scan]Karel Zak2013-03-271-1/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* blkid: use xalloc.h when possibleSami Kerola2013-03-261-4/+5
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: make the section AVAILABILITY always come last in man pagesBenno Schulenberg2013-03-204-12/+12
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* docs: normalize formatting of lslocks man pageBenno Schulenberg2013-03-201-24/+31
| | | | | | Also alphabetize the options and improve some wording. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* docs: normalize formatting of wipefs man pageBenno Schulenberg2013-03-201-30/+38
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* docs: normalize formatting of findmnt man pageBenno Schulenberg2013-03-201-28/+56
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* docs: sort the options in findmnt man page alphabeticallyBenno Schulenberg2013-03-201-63/+65
| | | | | | Also improve wording and formatting a bit. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* blkid: also accept -V for displaying version informationBenno Schulenberg2013-03-202-3/+4
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* docs: improve wording and formatting of blkid man pageBenno Schulenberg2013-03-201-70/+67Star
| | | | | | | Furthermore, explain the device argument right at the beginning, since it is not an option, and alphabetize -k. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* whereis: canonicalize directories pathsKarel Zak2013-03-202-5/+7
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* wipefs: add -f to getopt_long()Karel Zak2013-03-191-1/+1
| | | | | Reported-by: Dan Horák <dhorak@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: generic whereis.1 clean upSami Kerola2013-03-191-36/+25Star
| | | | | | | Align with howto-man-page.txt, and more importantly remove out dated 'SEE ALSO' and 'BUGS' sections. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* whereis: support MANPATH environment variableSami Kerola2013-03-192-14/+19
| | | | | | | | | | The MANPATH has been around long enough that it can be added to whereis default search path. Reference: manpath(1) Addresses: http://pubs.opengroup.org/onlinepubs/7908799/xbd/envvar.html Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* whereis: align with howto-usage-function.txtSami Kerola2013-03-191-18/+15Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* whereis: add search scope listing optionSami Kerola2013-03-192-1/+39
| | | | | | | Mostly useful when debugging why the command does, or does not, work. Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* whereis: rewrite most of the commandSami Kerola2013-03-191-263/+310
| | | | | | | | | The earlier code gave little or no change to fix bugs and improve the command. This rewrite attempts to make further patching easier. Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com> Co-Author: Karel Zak <kzak@redhat.com>
* docs: add TB to list of supported suffixesKarel Zak2013-03-182-2/+2
| | | | | Reported-by: Lukas Czerner <lczerner@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* chkdupexe: remove, deprecated for yearsKarel Zak2013-03-144-166/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* findmnt: add FREQ and PASSNO columnsKarel Zak2013-03-141-1/+17
| | | | | | | ... to provide all information from fstab. Reported-by: Roger Leigh <rleigh@codelibre.net> Signed-off-by: Karel Zak <kzak@redhat.com>
* kill: support --list=<signal>Karel Zak2013-03-132-10/+18
| | | | | | The '=' is expected for optional arguments and required in procps version. Signed-off-by: Karel Zak <kzak@redhat.com>
* kill: add pretty printed list output (for compatibility with procps)Sami Kerola2013-03-132-48/+89
| | | | | | | | * add -L, --table References: http://www.freelists.org/post/procps/kill1-consolidation Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* kill: use new API from lib/procutils.cKarel Zak2013-03-124-145/+24Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: add long options and tidy up kill.1Sami Kerola2013-03-121-41/+45
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* kill, procs: use pid_t for pidsSami Kerola2013-03-123-13/+13
| | | | | | Reference: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/linux/threads.h#n30 Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* kill: use libc error printing facilities and exit valuesSami Kerola2013-03-122-33/+25Star
| | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* kill: align with howto-usage-function.txtSami Kerola2013-03-121-7/+21
| | | | | | | | | [kzak@redhad.com: - s/commandname/name/ - improve --all description - add -h/--help] Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* kill: add long optionsSami Kerola2013-03-121-5/+5
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: improve wording, grammar and formatting of lsblk man pageBenno Schulenberg2013-03-041-58/+78
| | | | | | Also sort the options alphabetically. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* docs: improve grammar and formatting of explanation of "-o +list"Benno Schulenberg2013-03-043-6/+6
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* findmnt: allow to read (PART)UUID/LABEL from udev DBKarel Zak2013-02-182-14/+78
| | | | | | | | | | | Currently findmnt uses libmount to get filesystem properties (and libmount uses libblkid). This works as expected, but root permissions are required to read the tags from the devices. It seems better to read the information from udev db and use libblkid as fallback solution only. Signed-off-by: Karel Zak <kzak@redhat.com>
* lsblk: resuse udev handlerKarel Zak2013-02-181-4/+9
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: add missing information about -o +<list>Karel Zak2013-02-182-0/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lslocks: support -o +<list> conventionKarel Zak2013-02-182-5/+9
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lslocks: add BLOCKER columnKarel Zak2013-02-182-21/+44
| | | | | | BLOCKER - PID of the process blocking the lock Signed-off-by: Karel Zak <kzak@redhat.com>
* lslocks: detect blocked locks, fix /proc/locks parserKarel Zak2013-02-142-7/+12
| | | | | | | | | | | | | | | | | | | | $ flock foo -c "sleep 100" & flock foo -c "sleep 100" old version: $ lslocks lslocks: failed to parse pid: 'WRITE' new version: COMMAND PID TYPE SIZE MODE M START END PATH [...] flock 1318 FLOCK 0B WRITE* 0 0 0 /home/projects/ flock 1319 FLOCK 0B WRITE 0 0 0 /home/projects/ The asterisk (e.g. WRITE*) is used for blocked processes. Reported-by: Mantas Mikulenas <grawity@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* lslocks: use libmount to parse mountinfoKarel Zak2013-02-142-18/+17Star
| | | | | | | | | | | | | old version: $ strace -e open lslocks 2>&1 | grep mountinfo | wc -l 118 new version: strace -e open ./lslocks 2>&1 | grep mountinfo | wc -l 1 Reported-by: Bernhard Voelker <mail@bernhard-voelker.de> Signed-off-by: Karel Zak <kzak@redhat.com>
* a pointer should not be compared to zero [coccinelle]Sami Kerola2013-02-061-3/+3
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* textual: spell and encode the name of Arkadiusz Miśkiewicz correctlyBenno Schulenberg2013-02-068-9/+9
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* libblkid: remove optimization from verify( funrtionKarel Zak2013-02-011-0/+11
| | | | | | | | | | | | | | | | Now libblkid (the cache based part) tries to probe for the cached filesystem firstly. This optimization is broken, because: * new another superblock could be on the device and the original is already obsolete * we still need to probe for partitions and raids * the code was too fragile The patch also suggests lsblk --fs in blkid.8 for end users. lsblk read information from used db. Reported-by: Andreas Hofmeister <andi@collax.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* textual: fix the example in whereis man page, plus further improvementsBenno Schulenberg2013-01-301-42/+41Star
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* rename: make usage() translator friendlySami Kerola2013-01-251-8/+8
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* lsblk: make usage() translator friendlySami Kerola2013-01-251-25/+24Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* findmnt: make usage() translator friendlySami Kerola2013-01-251-6/+5Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* textual: use UTIL_LINUX_VERSION everywhereKarel Zak2013-01-2512-29/+12Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* textual: standardize reporting of program name plus package versionBenno Schulenberg2013-01-251-2/+3
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* textual: gettextize several overlooked messagesBenno Schulenberg2013-01-251-2/+1Star
| | | | | | Also improve the clarity of some of them. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* textual: fix a few typos in some of the usage help textsBenno Schulenberg2013-01-252-7/+7
| | | | | | Also improve clarity of some other lines of those texts. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* cal: don't mix ncurses output functions and printf()Karel Zak2013-01-171-16/+27
| | | | | | | | | | | | | | | Fedora 18 (ncurses-libs-5.9-7.20121017, glibc-2.16-28): $ cal | cat Actual results: January 2013 Su Mo Tu We Th Fr Sa 1 2 3 4 5 6 7 8 9 10 11 1213 14 15 16 17 18 1920 21 22 23 24 25 2627 28 29 30 31 Not sure where is the problem, but it's too fragile to mix two output methods in one code. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=896447 Signed-off-by: Karel Zak <kzak@redhat.com>
* findmnt: use tree output in more casesKarel Zak2013-01-171-7/+19
| | | | | | | | | It seems that we can create the tree also if output is restricted by fstype or options filter, for example $ findmnt -t cgroups Signed-off-by: Karel Zak <kzak@redhat.com>