summaryrefslogtreecommitdiffstats
path: root/misc-utils
Commit message (Collapse)AuthorAgeFilesLines
* Revert "blkid: remove unused variable"Karel Zak2014-05-131-2/+2
| | | | This reverts commit 0fd4b8132587a264f1e0df46eec7c12bba68c752.
* build-sys: remove unnecessary void castsSami Kerola2014-05-121-1/+1
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* logger: check numeric priority and facility input valuesSami Kerola2014-05-121-3/+14
| | | | | | | | Earlier use of unknown facility or priority number was accepted, and resulted in unexpected result. For example when looking journalctl --priority=7.8 was converted to priotity 0 and facility 1. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* logger: fail when io vector number exceeds maximumSami Kerola2014-05-121-1/+6
| | | | | | | | | Earlier version silently failed without logging anything. $ logger --journald=/etc/services ; echo $? 1 Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* blkid: remove unused variableSami Kerola2014-05-121-2/+2
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* textual: remove square brackets from around three dotsBenno Schulenberg2014-05-061-1/+1
| | | | | | Also improve some option descriptions here and there. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* lsblk: add -O option to show all available columnsMasatake YAMATO2014-05-062-1/+15
| | | | | | | | | | | | | Simple command line for gathering information as many as possible is useful when understanding a system, especially when trouble shooting. This patch introduces -O option which enables all available columns. [kzak@redhat.com: - define collisions between options, - define columns when parse argv[]] Signed-off-by: Masatake YAMATO <yamato@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* uuidd: remove timeout from systemd service fileKarel Zak2014-04-291-1/+1
| | | | | | | | | | It seems that SAP does not like the timeout, for performance is better to keep the daemon permanently running. This is no problem because uuidd is used only on systems with very unusual requirements to UUID. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1092039 Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'kill-tests-v4' of git://github.com/kerolasa/lelux-utiliteetitKarel Zak2014-04-281-5/+16
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | * 'kill-tests-v4' of git://github.com/kerolasa/lelux-utiliteetit: lib/procutils: notice setuid() process ownership changes lib/procutils: reset errno before strtol() call kill: add --verbose option to display what is killed tests: check kill all user processes tests: check kill print pid option tests: check various ways to specify kill signal tests: check kill is converting signals names correctly tests: add signal receiver program kill: remove unnecessary indirection kill: make options --pid and --queue mutually exclusive
| * kill: add --verbose option to display what is killedSami Kerola2014-04-261-2/+9
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * kill: remove unnecessary indirectionSami Kerola2014-04-261-3/+1Star
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * kill: make options --pid and --queue mutually exclusiveSami Kerola2014-04-261-0/+6
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | wipefs: don't erase nested partition tables by defaultKarel Zak2014-04-242-1/+18
|/ | | | | | | | | | | | | | | | | | | | | | | | It's possible the partition contains a partition table (BSD, or hybrid boot images). It could be unexpected for users that the lost all (or another) partitions when work with non-whole disk device. Let's require --force. For example: # wipefs --all /dev/sdb erases all including partition table, but on hybrid disk where the first partition starts at first sector (so partition table is within the first partition): # wipefs --all /dev/sdb1 /dev/sdb1: ignore nested "dos" partition table on non-whole disk device wipefs: Use the --force option to force erase. asks for --force. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1077310 Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: consolidate systemd supportKarel Zak2014-04-093-18/+18
| | | | | | | | | | | | | | | * systemd (since v209) uses only one library (when compiled without --enable-compat-libs) * all systemd build-sys stuff is merged into HAVE_SYSTEMD (automake) and HAVE_LIBSYSTEMD (C macro) now * all is controlled by --with-systemd, default is to automatically check for systemd libs * no more --enable-socket-activation and --enable-journald Signed-off-by: Karel Zak <kzak@redhat.com>
* kill: fix bug in --all semanticKarel Zak2014-04-071-1/+1
| | | | | | Introduces by 2ab6683f59cd3371b1c3ac8b5c248d5104ed4d41. Signed-off-by: Karel Zak <kzak@redhat.com>
* kill: make kill-by-name more obvious in man pageKarel Zak2014-04-071-6/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* kill: add copyrights, etc.Karel Zak2014-04-072-4/+13
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* kill: return 64 on partial successKarel Zak2014-04-072-24/+52
| | | | | | | | | | | | | Return 64 (aka SOME_OK) when more than process specified and the operation success only for subset of the processes. # kill -s 0 firefox mutt xxx; echo $? kill: cannot find process "xxx" 64 We already use this concept for chcpu(8) or mount(8). Signed-off-by: Karel Zak <kzak@redhat.com>
* kill: tiny change in man pageKarel Zak2014-04-071-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* kill: coding style, simplify codeKarel Zak2014-04-071-15/+13Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* kill: rename printsig() to print_signal_name()Karel Zak2014-04-071-7/+7
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* kill: rename printsignals() to print_all_signalsprint_all_signals()Karel Zak2014-04-071-4/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* kill: reorder functions to make it more readableKarel Zak2014-04-071-199/+195Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'kill' of git://github.com/kerolasa/lelux-utiliteetitKarel Zak2014-04-072-289/+301
|\ | | | | | | | | | | | | | | | | | | | | | | | | * 'kill' of git://github.com/kerolasa/lelux-utiliteetit: kill: move sigqueue inputs to control struct kill: add parse_arguments() function kill: tell what is wrong rather than output usage() kill: use control structure to pass user input to functions kill: deprecat invocation as 'pid' command name kill: make usage() not to return kill: move magic numbers in beginning of the file kill: flip all comparions to be in smaller - greater order kill: fix coding style
| * kill: move sigqueue inputs to control structSami Kerola2014-03-301-12/+17
| | | | | | | | | | | | | | | | Use of global variables is messy. The earlier implementation also assumed queue argument never to be textual, such as 'HUP', which now works as one might expect. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * kill: add parse_arguments() functionSami Kerola2014-03-301-53/+60
| | | | | | | | | | | | | | Long main() is difficult to read, so moving argument parsing to separate function should make sense. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * kill: tell what is wrong rather than output usage()Sami Kerola2014-03-301-8/+8
| | | | | | | | | | | | | | | | Getting usage as error message is not specific enough. As a user I want to know what is wrong, and if it is unclear after error message how to recover then I run command with --help. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * kill: use control structure to pass user input to functionsSami Kerola2014-03-301-50/+59
| | | | | | | | | | | | This should make it easier to understand how the program works. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * kill: deprecat invocation as 'pid' command nameSami Kerola2014-03-302-0/+7
| | | | | | | | | | | | | | | | Enabling options by renaming command is both unexpected and undocumented. This magic is now deprecated and with remark of removal of this functionality in future. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * kill: make usage() not to returnSami Kerola2014-03-301-14/+12Star
| | | | | | | | | | | | | | | | And change the function argument to be an output stream. Earlier the --help option made kill exit with none-zero value, that is now corrected. CC: Benno Schulenberg <bensberg@justemail.net> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * kill: move magic numbers in beginning of the fileSami Kerola2014-03-301-5/+9
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * kill: flip all comparions to be in smaller - greater orderSami Kerola2014-03-301-7/+7
| | | | | | | | | | | | This makes code more readable. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * kill: fix coding styleSami Kerola2014-03-301-277/+259Star
| | | | | | | | | | | | | | | | | | The kill was deprecated at the time lot of other tools got style unification. Now when deprecation is lifted it is time to get kill cleaner. This commit does not modify code, only various spacing issues, removal of unecessary braces, and such are dealt. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | libsmartcols: clean up flags usageKarel Zak2014-04-033-13/+13
| | | | | | | | | | | | | | | | | | * rename flags functions to scols_table_enable_* * rename *_no_foo() functions to _nofoo() * output formats are mutually exclusive, so don't use flags there * don't assume symbols in scols_new_table(), use scols_table_set_symbols() Signed-off-by: Karel Zak <kzak@redhat.com>
* | lsblk: remove unnecessary codeKarel Zak2014-04-031-1/+0Star
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | lsblk: clean up data preparationKarel Zak2014-04-031-132/+77Star
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | findmnt: cleanup flagsKarel Zak2014-04-031-37/+34Star
| | | | | | | | | | | | Let's use one flags variable for everything. Signed-off-by: Karel Zak <kzak@redhat.com>
* | lslocks: use libsmartcolsOndrej Oprala2014-04-032-29/+36
| | | | | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* | lsblk: use libsmartcolsOndrej Oprala2014-04-032-100/+116
| | | | | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* | findmnt: use libsmartcolsOndrej Oprala2014-04-032-82/+99
| | | | | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* | libsmartcols: add columnsKarel Zak2014-04-031-1/+1
|/ | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* findfs: add ability to work with PART{UUID,LABEL}= tooKarel Zak2014-03-282-24/+44
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* findfs: use symbolic exit values, and tell about them in manualSami Kerola2014-03-262-10/+38
| | | | | | | [[kzak@redhat.com: - move return codes to findfs.c] Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* mcookie: add --max-size optionSami Kerola2014-03-262-5/+42
| | | | | | | | | | | | Just in case someone wants to add entropy from device with invocation demonstrated below. $ mcookie --file /dev/urandom --max-size 64k [kzak@redhat.com: - use all-io.h] Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* mcookie: use control structure, and fix usage()Sami Kerola2014-03-261-45/+49
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* mcookie: use same variable type consistentlySami Kerola2014-03-261-5/+5
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* mcookie: allow --file option be defined multiple timesSami Kerola2014-03-261-29/+44
| | | | | | Earlier only the last option argument took effect. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* mcookie: use lib/randutilsSami Kerola2014-03-263-75/+28Star
| | | | | | | | | The mcookie should reuse existing code, and there is definitely no need to prefer /dev/random for this utility. See reference for explanation about later statement. References: http://www.2uo.de/myths-about-urandom/ Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* lib/tt: add tt_line_get_userdata()Karel Zak2014-03-111-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lib/colors: add info to man pages, add terminal-colors.d.5Karel Zak2014-03-111-0/+11
| | | | | Co-Author: Ondrej Oprala <ooprala@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>