summaryrefslogtreecommitdiffstats
path: root/misc-utils
Commit message (Collapse)AuthorAgeFilesLines
* Fix various typosYuri Chornoivan2013-04-261-1/+1
|
* wipefs: clean up codeKarel Zak2013-04-261-28/+35
| | | | | | | This is C, use int & bits for boolean stuff rather than army of variables. Signed-off-by: Karel Zak <kzak@redhat.com>
* wipefs: add --backupOndrej Oprala2013-04-262-4/+55
| | | | | | | | [kzak@redhat.com: - don't wipe if failed to create a backup file - use ts_scsi_debug_init in the regression tests] Signed-off-by: Ondrej Oprala <ooprala@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* blkid: use xalloc everywhereKarel Zak2013-04-101-22/+4Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* various: fix shadow declarations [smatch scan]Sami Kerola2013-04-091-1/+0Star
| | | | | | | | | | | | | | | | | | | | | | libmount/src/tab.c:990:34: warning: symbol 'fs' shadows an earlier one libmount/src/tab.c:970:26: originally declared here misc-utils/findmnt.c:492:30: warning: symbol 'tmp' shadows an earlier one misc-utils/findmnt.c:473:14: originally declared here fdisks/fdiskdoslabel.c:211:36: warning: symbol 'pe' shadows an earlier one fdisks/fdiskdoslabel.c:180:20: originally declared here fdisks/fdiskdoslabel.c:639:34: warning: symbol 'i' shadows an earlier one fdisks/fdiskdoslabel.c:578:16: originally declared here fdisks/fdiskdoslabel.c:947:21: warning: symbol 'i' shadows an earlier one fdisks/fdiskdoslabel.c:924:16: originally declared here fdisks/fdiskdoslabel.c:976:29: warning: symbol 'i' shadows an earlier one fdisks/fdiskdoslabel.c:924:16: originally declared here fdisks/fdiskdoslabel.c:984:29: warning: symbol 'i' shadows an earlier one fdisks/fdiskdoslabel.c:924:16: originally declared here [kzak@redhat.com: - don't use local 'tmp' in findmnt.c] Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* uuidd.8: Document --debug and --quiet long options.Ville Skyttä2013-04-081-2/+2
| | | | Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
* logger: make socket initialization in main() more readableKarel Zak2013-04-081-4/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* logger: allow to log using tcp transport protocolSami Kerola2013-04-082-62/+113
| | | | | | | | | | | | | | | | | This commit fixes error in usage() text, which claimed TCP is default transport protocol. That was not true, and neither it should be. The syslog messages has traditionally sent using UDP. For the logger remains using UDP as first transport, but if it fails a TCP connection is attempted. If an user wishes remote logging can be forced to use either UDP or TCP. The service port for UDP is familiar 'syslog', for TCP the port 'syslog-conn' seems like reasonable default. [kzak@redhat.com: - rename myopenlog to unix_socket(), - always reset st to -1] Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* logger: make local sockets to try both stream and datagramSami Kerola2013-04-051-17/+25
| | | | | | | | | | | | | | | | | | | When journald, from systemd, is in use logger gave following error. $ logger --socket /dev/log test logger: connect /dev/log: Protocol wrong type for socket The journald supports only AF_DGRAM, and nothing else. Support for AF_STREAM sockets was dropped because it messed up message ordering. From an users point of view necessity to add --udp (UNIX(TM) Datagram Protocol?) option when talking to syslog via unix socket felt confusing and wrong. The command should know what is the socket type, and silently use the correct one, unless the type is explicitely defined. CC: Karel Zak <kzak@redhat.com> Adviced-by: Lennart Poettering <lennart@poettering.net> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* getopt: fix usage() typo unquote -> unquotedKarel Zak2013-04-051-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* findmnt: fix typo fsroot -> nofsrootKarel Zak2013-04-051-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* blkid: use O_CLOEXECKarel Zak2013-04-031-1/+1
| | | | | | | ... to make "strace -e open blkid" for libblkid stuff without exceptions. Signed-off-by: Karel Zak <kzak@redhat.com>
* lsblk: add --pathsKarel Zak2013-03-292-19/+45
| | | | | Now it's not so simple to generate full paths to devices if you want to use user friendly names like /dev/mapper/foo. Let's make it easy.
* wipefs: make do_wipe() more readable [coverity scan]Karel Zak2013-03-271-1/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* rename: fix memory leak [coverity scan]Karel Zak2013-03-271-1/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* wipefs: fix memory leak [coverity scan]Karel Zak2013-03-271-2/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* 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>