]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
11 years agotests: add exit case "KNOWN FAILED"
Ruediger Meier [Sat, 10 May 2014 01:57:26 +0000 (03:57 +0200)] 
tests: add exit case "KNOWN FAILED"

Now we can mark tests as known to be broken without bothering
users with exit failure. In the build log this "KNOWN FAILED"
may be interpreted as TODO ;)

The main advantage of "known-fail" instead of just skipping
is that we will still find the test diff.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agotests: fix var names
Ruediger Meier [Sat, 10 May 2014 05:04:11 +0000 (07:04 +0200)] 
tests: fix var names

Translate "." and "-" to "_". We assume that nobody will add
completely stupid test file names.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agotests: allow test options to be overridden by env
Ruediger Meier [Sat, 10 May 2014 00:00:53 +0000 (02:00 +0200)] 
tests: allow test options to be overridden by env

Specially for automated builds the user may want to have some
fine granulated influence like

export TS_OPT_libmount_verbose="yes"
export TS_OPT_ipcs_fake="yes"
export TS_OPT_ipcs_limits2_fake="no"
if <big endian> then
  export TS_OPT_hexdump_fake="yes"
fi
make check

Even for interactive developers this could be useful for example to
debug just one particuar test while having a regular run with stress:

TS_OPT_script_verbose="yes" \
TS_OPT_script_memcheck="yes" \
../tests/run.sh --parallel=256 --srcdir=.. --builddir=. --nonroot

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agotests: call ts_init_env as early as possible
Ruediger Meier [Sat, 10 May 2014 02:51:22 +0000 (04:51 +0200)] 
tests: call ts_init_env as early as possible

Soon we want to use some env vars within ts_has_option(). That's
why we move some lines to make this possible.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agolibsmartcols: (docs) reorder functions in version section
Karel Zak [Wed, 7 May 2014 09:48:53 +0000 (11:48 +0200)] 
libsmartcols: (docs) reorder functions in version section

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agocolumn: inform user when multibyte conversion error occurs
Sami Kerola [Sun, 4 May 2014 15:39:38 +0000 (16:39 +0100)] 
column: inform user when multibyte conversion error occurs

The column(1) read input until conversion error, and used incomplete
input when outputing, that made at least me to wonder where the rest
disappeared without explanation.  IMHO it is better to fail immediately
rather than do only half of the task.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agoMerge branch 'kill-tests' of https://github.com/rudimeier/util-linux
Karel Zak [Wed, 7 May 2014 07:21:52 +0000 (09:21 +0200)] 
Merge branch 'kill-tests' of https://github.com/rudimeier/util-linux

11 years agolib/boottime: add a new file
Karel Zak [Tue, 6 May 2014 18:27:10 +0000 (20:27 +0200)] 
lib/boottime: add a new file

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agotests: fix kill problems
Ruediger Meier [Tue, 6 May 2014 17:16:53 +0000 (19:16 +0200)] 
tests: fix kill problems

There were several failures (missing tmp files, missing pids) on travis
build farm which I couldn't track down completely. Here we fix some
possible issues:
 - mktemp -u is unsafe, maybe even in practice if there is a bad random
   generator
 - make sure that mktemp does not give us pure integer filnames which
   would not work for "kill by-name"
 - avoid using trap, could be that it removed tmp files on wrong signals

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agotests: kill_functions.sh needs gawk (skip if sourced)
Ruediger Meier [Tue, 6 May 2014 16:48:35 +0000 (18:48 +0200)] 
tests: kill_functions.sh needs gawk (skip if sourced)

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agoinclude/boottime: add a new file
Karel Zak [Tue, 6 May 2014 14:38:53 +0000 (16:38 +0200)] 
include/boottime: add a new file

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolib/timeutils: remove get_boot_time from libcommon
Karel Zak [Tue, 6 May 2014 11:16:05 +0000 (13:16 +0200)] 
lib/timeutils: remove get_boot_time from libcommon

clock_gettime() needs -lrt, so let's keep this stuff
outside libcommon.la

Reported-by: Ruediger Meier <sweet_f_a@gmx.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agohwclock: fix typo
Karel Zak [Tue, 6 May 2014 10:51:42 +0000 (12:51 +0200)] 
hwclock: fix typo

Reported-by: Stanislav Brabec <sbrabec@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agohwclock: Check drift value in /etc/adjtime
Stanislav Brabec [Mon, 5 May 2014 18:49:49 +0000 (20:49 +0200)] 
hwclock: Check drift value in /etc/adjtime

Due to bug in older versions of hwclock, /etc/adjtime can contain
excessive drift value (up to many years per day). Prevent it
from applying.

Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
11 years agohwclock: Prevent excessive drift values
Stanislav Brabec [Mon, 5 May 2014 18:49:29 +0000 (20:49 +0200)] 
hwclock: Prevent excessive drift values

Failure of CMOS battery can cause writing of excessive drift
values (up to many years per day).

This causes excessive hwclock adjustment next time, which may lead
to overflow in calculate_adjustment() (and hang before 4a44a54b).

Prevent this situation, check drift for limits and reset drift to zero
instead.

Steps to reproduce:

mv /etc/adjtime /etc/adjtime.backup

rm /etc/adjtime
hwclock --set --date 2001-01-01\ 01:00:00

changing of /etc/adjtime.
mv /etc/adjtime /etc/adjtime.saved
hwclock --set --date 2001-01-02\ 01:00:01
mv /etc/adjtime.saved /etc/adjtime

echo "======= The /etc/adjtime has a \"correct\" look:"
cat /etc/adjtime

hwclock --debug --systohc --utc
echo "======= The /etc/adjtime now has deeply failed drift value:"
cat /etc/adjtime

mv /etc/adjtime /etc/adjtime.saved
hwclock --set --date 2015-01-01\ 01:00:00
mv /etc/adjtime.saved /etc/adjtime

hwclock --debug --adjust
echo "======= And the last /etc/adjtime:"
cat /etc/adjtime

mv /etc/adjtime.backup /etc/adjtime
hwclock --systohc --utc

Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
11 years agochsh: Improve the typesetting of the manual
Bjarni Ingi Gislason [Sat, 3 May 2014 02:32:36 +0000 (02:32 +0000)] 
chsh: Improve the typesetting of the manual

  Protect a full stop (.), that begins or ends a string, with \&

  Change '-' to '\-', if it indicates an option

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
11 years agochfn: Improve the typesetting of the manual
Bjarni Ingi Gislason [Sat, 3 May 2014 02:32:35 +0000 (02:32 +0000)] 
chfn: Improve the typesetting of the manual

  Change comma (,) to a period (.) as it is the control character

  Use macro RB instead of the reverse one (BR)

  Add missing [ in front of  an (optional) option

  Protect a full stop (.), that begins or ends a string, with \&

  Change '-' to '\-', if it indicates an option

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
11 years agolibuuid: (uuid.3) Improve the typesetting of the manual
Bjarni Ingi Gislason [Fri, 2 May 2014 02:37:41 +0000 (02:37 +0000)] 
libuuid: (uuid.3) Improve the typesetting of the manual

  Protect a full stop (.), that begins or ends a string, with \&

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
11 years agolibuuid: (uuid_unparse.3) Improve the typesetting of the manual
Bjarni Ingi Gislason [Fri, 2 May 2014 02:37:40 +0000 (02:37 +0000)] 
libuuid: (uuid_unparse.3) Improve the typesetting of the manual

  Change '\-' (minus) to '-' (code "hyphen-minus", rendered with the
glyph 'hyphen' in troff), if it is a part of a compound word.

  Use \e to print the escape character, instead of \\, as \e is not
interpreted in copy mode

  Protect a full stop (.), that begins or ends a string, with \&

  Inhibit right adjusting for the section "SEE ALSO" with ".na/.ad", or
use '.ad l' for the entire manual

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
11 years agolibuuid: (man/uuid_time.3) Improve the typesetting of the manual
Bjarni Ingi Gislason [Fri, 2 May 2014 02:37:39 +0000 (02:37 +0000)] 
libuuid: (man/uuid_time.3) Improve the typesetting of the manual

  Protect a full stop (.), that begins or ends a string, with \&

  Inhibit right adjusting for the section "SEE ALSO" with ".na/.ad", or
use '.ad l' for the entire manual

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
11 years agolibuuid: (uuid_parse.3) Improve the typesetting of the manual
Bjarni Ingi Gislason [Fri, 2 May 2014 02:37:38 +0000 (02:37 +0000)] 
libuuid: (uuid_parse.3) Improve the typesetting of the manual

  Use \e for the printable escape character instead of \\

  Protect a full stop (.), that begins or ends a string, with \&

  Inhibit right adjusting for the section "SEE ALSO" with ".na/.ad", or
use '.ad l' for the entire manual

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
11 years agolibuuid: (uuid_is_null.3) Improve the typesetting of the manual
Bjarni Ingi Gislason [Fri, 2 May 2014 02:37:37 +0000 (02:37 +0000)] 
libuuid: (uuid_is_null.3) Improve the typesetting of the manual

  Protect a full stop (.), that begins or ends a string, with \&

  Inhibit right adjusting for the section "SEE ALSO" with ".na/.ad", or
use '.ad l' for the entire manual

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
11 years agolibuuid: (uuid_generate) Improve the typesetting of the manual
Bjarni Ingi Gislason [Fri, 2 May 2014 02:37:36 +0000 (02:37 +0000)] 
libuuid: (uuid_generate) Improve the typesetting of the manual

  Change '-' to '\-', if it means a minus

  Protect a full stop (.), that begins or ends a string, with \&

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
11 years agolibuuid: (uuid_copy.3) Improve the typesetting of the manual
Bjarni Ingi Gislason [Fri, 2 May 2014 02:37:35 +0000 (02:37 +0000)] 
libuuid: (uuid_copy.3) Improve the typesetting of the manual

  Protect a full stop (.), that begins or ends a string, with \&

  Inhibit right adjusting for the section "SEE ALSO" with ".na/.ad", or
use '.ad l' for the entire manual

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
11 years agolibuuid: (uuid_compare.3) Improve the typesetting of the manual
Bjarni Ingi Gislason [Fri, 2 May 2014 02:37:34 +0000 (02:37 +0000)] 
libuuid: (uuid_compare.3) Improve the typesetting of the manual

  Protect a full stop (.), that begins or ends a string, with \&

  Inhibit right adjusting for the section "SEE ALSO" with ".na/.ad", or
use '.ad l' for the entire manual

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
11 years agolibuuid: (uuid_clear.3) Improve the typesetting of the manual
Bjarni Ingi Gislason [Fri, 2 May 2014 02:37:33 +0000 (02:37 +0000)] 
libuuid: (uuid_clear.3) Improve the typesetting of the manual

  Protect a full stop (.), that begins or ends a string, with \&

  Inhibit right adjusting for the section "SEE ALSO" with ".na/.ad", or
use '.ad l' for the entire manual

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
11 years agolib/terminal-colors.d.5: Improve the typesetting of the manual
Bjarni Ingi Gislason [Wed, 30 Apr 2014 02:05:00 +0000 (02:05 +0000)] 
lib/terminal-colors.d.5: Improve the typesetting of the manual

  Remove '\&' in front of a full stop (.), when it does not start or
end a string

  Adjust space between sentences to two space characters (or begin each
sentence on a new line).

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
11 years agolibblkid/libblkid.3: Improve the typsetting of the manual
Bjarni Ingi Gislason [Wed, 30 Apr 2014 02:04:59 +0000 (02:04 +0000)] 
libblkid/libblkid.3: Improve the typsetting of the manual

   Correct space between sentences to two space characters
 (or begin each sentence on a new line).

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
11 years agosetpriv: Fix --selinux-label
Andy Lutomirski [Thu, 1 May 2014 05:10:13 +0000 (22:10 -0700)] 
setpriv: Fix --selinux-label

This commit:

    commit 05cef8eafbf169a8da1d2831f5ed3d5b1b81aaad
    Author: Sami Kerola <kerolasa@iki.fi>
    Date:   Sat Apr 13 20:54:59 2013 +0100

        setpriv: check writing to a file descriptor was successful

broke --selinux-label.  It checks whether fsyncing /proc/self/attr/exec
succeeds, and it doesn't, because fsync isn't supported on that file.

I have stealthily improved the error message as part of this fix.

Signed-off-by: Andy Lutomirski <luto@amacapital.net>
11 years agotextual: remove square brackets from around three dots
Benno Schulenberg [Wed, 30 Apr 2014 08:38:12 +0000 (10:38 +0200)] 
textual: remove square brackets from around three dots

Also improve some option descriptions here and there.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
11 years agodocs: grammarize the usage howto
Benno Schulenberg [Tue, 29 Apr 2014 15:33:04 +0000 (17:33 +0200)] 
docs: grammarize the usage howto

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
11 years agotextual: slice up and standardize the usage text of ionice
Benno Schulenberg [Tue, 29 Apr 2014 13:42:23 +0000 (15:42 +0200)] 
textual: slice up and standardize the usage text of ionice

Done for ease of translation and maintenance.  Also improve the
clarity of some of the descriptions, and of one error message.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
11 years agoionice: add a missing error message
Benno Schulenberg [Tue, 29 Apr 2014 09:36:22 +0000 (11:36 +0200)] 
ionice: add a missing error message

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
11 years agoipcs: do not gettextize wordless strings
Benno Schulenberg [Mon, 28 Apr 2014 21:12:41 +0000 (23:12 +0200)] 
ipcs: do not gettextize wordless strings

Also tweak a few parts of the usage message.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
11 years agoinclude/c: do not gettextize a wordless string
Benno Schulenberg [Mon, 28 Apr 2014 16:15:00 +0000 (18:15 +0200)] 
include/c: do not gettextize a wordless string

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
11 years agolib/colors: change an include to a local one
Benno Schulenberg [Mon, 28 Apr 2014 16:10:38 +0000 (18:10 +0200)] 
lib/colors: change an include to a local one

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
11 years agoinclude/carefulputc: remove a duplicate include
Benno Schulenberg [Mon, 28 Apr 2014 16:08:42 +0000 (18:08 +0200)] 
include/carefulputc: remove a duplicate include

Also tweak a comment.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
11 years agoinclude/c: remove a duplicate include
Benno Schulenberg [Mon, 28 Apr 2014 15:52:42 +0000 (17:52 +0200)] 
include/c: remove a duplicate include

Also tweak some comments.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
11 years agolsblk: add -O option to show all available columns
Masatake YAMATO [Sun, 27 Apr 2014 05:18:41 +0000 (14:18 +0900)] 
lsblk: add -O option to show all available columns

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>
11 years agodmesg: add missing include
Karel Zak [Tue, 6 May 2014 08:28:26 +0000 (10:28 +0200)] 
dmesg: add missing include

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibsmartcols: check recount_widths() return value
Karel Zak [Tue, 6 May 2014 08:21:24 +0000 (10:21 +0200)] 
libsmartcols: check recount_widths() return value

Reported-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolib/pager: use names when referring to standard file descriptors
Sami Kerola [Sat, 26 Apr 2014 17:30:06 +0000 (18:30 +0100)] 
lib/pager: use names when referring to standard file descriptors

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agolib/timeutils: fix memory leak
Sami Kerola [Sat, 26 Apr 2014 16:50:46 +0000 (17:50 +0100)] 
lib/timeutils: fix memory leak

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agoswapon, swapheader, mkswap: move swap signature to header
Sami Kerola [Fri, 25 Apr 2014 23:50:30 +0000 (00:50 +0100)] 
swapon, swapheader, mkswap: move swap signature to header

Both swapon and mkswap need to know what is valid device signature, so
share the value.

[kzak@redhat.com: - use SWAP_SIGNATURE_SZ properly in write_signature()]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoswapon: swaps with legacy version label are not supported
Sami Kerola [Fri, 25 Apr 2014 23:40:28 +0000 (00:40 +0100)] 
swapon: swaps with legacy version label are not supported

Reviewed-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agoinclude/swapheader.h: ensure type sizes
Sami Kerola [Fri, 25 Apr 2014 21:08:23 +0000 (22:08 +0100)] 
include/swapheader.h: ensure type sizes

Use consistently the same type sizes as in libblkid and kernel.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agomkswap: remove legacy swap structure
Sami Kerola [Fri, 25 Apr 2014 21:05:33 +0000 (22:05 +0100)] 
mkswap: remove legacy swap structure

If software archeolgists want to know how the old, and unused, swap
header looked they can dig it from the revision history.

[kzak@redhat.com: - use sizeof() for SWAP_HEADER_SIZE]

Reference: 4c85aa3a4c26f2a2c33bf16960b548d5bbd5b4bf
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agomkswap, swaplabel: move version number to header
Sami Kerola [Fri, 25 Apr 2014 20:37:58 +0000 (21:37 +0100)] 
mkswap, swaplabel: move version number to header

Corrently only the swap version 1 is supported, which is a magic value so
move it to header.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agoinclude/c.h: add macro to print definitions as string
Sami Kerola [Fri, 25 Apr 2014 20:36:58 +0000 (21:36 +0100)] 
include/c.h: add macro to print definitions as string

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agolast: fix is_phantom() detection
Sami Kerola [Wed, 23 Apr 2014 22:32:11 +0000 (23:32 +0100)] 
last: fix is_phantom() detection

The /proc/<pid>/loginuid is not always available, and when so a running
session should not be determined to be gone.  This is a regression from
commit mentioned in reference.

Sessions that have started before previous system boot, and did not log
out meanwhile, will be marked as gone.  It is fair to say that these
sessions are most likely result of a wtmp corruption.

Reference: 404fa3f93c00c7e130f5a0ec963b2dc6a3743986
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agodmesg: move get_boot_time() to lib/timeutils
Sami Kerola [Wed, 23 Apr 2014 21:59:29 +0000 (22:59 +0100)] 
dmesg: move get_boot_time() to lib/timeutils

In future the last(1) will use get_boot_time() as well.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agouuidd: remove timeout from systemd service file
Karel Zak [Tue, 29 Apr 2014 08:37:26 +0000 (10:37 +0200)] 
uuidd: remove timeout from systemd service file

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>
11 years agotests: add kill_functions.sh to avoid duplicate code
Karel Zak [Mon, 28 Apr 2014 10:01:37 +0000 (12:01 +0200)] 
tests: add kill_functions.sh to avoid duplicate code

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoMerge branch 'kill-tests-v4' of git://github.com/kerolasa/lelux-utiliteetit
Karel Zak [Mon, 28 Apr 2014 09:10:40 +0000 (11:10 +0200)] 
Merge branch 'kill-tests-v4' of git://github.com/kerolasa/lelux-utiliteetit

* '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

11 years agolib/procutils: notice setuid() process ownership changes
Sami Kerola [Sun, 20 Apr 2014 09:36:05 +0000 (10:36 +0100)] 
lib/procutils: notice setuid() process ownership changes

Earlier the owner of a process was determined by owner of the
/proc/<pid>/stat file.  When changes user ID privileges with setuid() the
stat file ownership is not updated, that resulted kill(1) to consider
such processes where running using same uid as the present process.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agolib/procutils: reset errno before strtol() call
Sami Kerola [Tue, 15 Apr 2014 10:54:21 +0000 (11:54 +0100)] 
lib/procutils: reset errno before strtol() call

When going through /proc the last entry made readdir() to alter errno,
which made the strtol() to think something went wrong, resulting kill(1)
tests to fail when running in --parallel mode.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agokill: add --verbose option to display what is killed
Sami Kerola [Tue, 15 Apr 2014 10:40:33 +0000 (11:40 +0100)] 
kill: add --verbose option to display what is killed

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agotests: check kill all user processes
Sami Kerola [Fri, 11 Apr 2014 23:59:31 +0000 (00:59 +0100)] 
tests: check kill all user processes

CC: Bernhard Voelker <mail@bernhard-voelker.de>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agotests: check kill print pid option
Sami Kerola [Fri, 11 Apr 2014 23:33:55 +0000 (00:33 +0100)] 
tests: check kill print pid option

CC: Bernhard Voelker <mail@bernhard-voelker.de>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agotests: check various ways to specify kill signal
Sami Kerola [Wed, 9 Apr 2014 20:43:56 +0000 (21:43 +0100)] 
tests: check various ways to specify kill signal

CC: Bernhard Voelker <mail@bernhard-voelker.de>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agotests: check kill is converting signals names correctly
Sami Kerola [Wed, 9 Apr 2014 20:13:51 +0000 (21:13 +0100)] 
tests: check kill is converting signals names correctly

CC: Bernhard Voelker <mail@bernhard-voelker.de>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agotests: add signal receiver program
Sami Kerola [Tue, 8 Apr 2014 21:36:30 +0000 (22:36 +0100)] 
tests: add signal receiver program

Target to kill with a check that will be written later.

CC: Bernhard Voelker <mail@bernhard-voelker.de>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agokill: remove unnecessary indirection
Sami Kerola [Mon, 7 Apr 2014 21:41:00 +0000 (22:41 +0100)] 
kill: remove unnecessary indirection

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agokill: make options --pid and --queue mutually exclusive
Sami Kerola [Mon, 7 Apr 2014 21:32:44 +0000 (22:32 +0100)] 
kill: make options --pid and --queue mutually exclusive

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
11 years agomount: note that -c unused for mount.<type> in man page
Karel Zak [Fri, 25 Apr 2014 08:07:24 +0000 (10:07 +0200)] 
mount: note that -c unused for mount.<type> in man page

Addresses: https://github.com/karelzak/util-linux/issues/70
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agowipefs: don't erase nested partition tables by default
Karel Zak [Thu, 24 Apr 2014 11:42:54 +0000 (13:42 +0200)] 
wipefs: don't erase nested partition tables by default

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>
11 years agodocs: update TODO
Karel Zak [Wed, 23 Apr 2014 13:28:09 +0000 (15:28 +0200)] 
docs: update TODO

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agotests: update Py parse mountinfo test
Karel Zak [Wed, 23 Apr 2014 10:34:48 +0000 (12:34 +0200)] 
tests: update Py parse mountinfo test

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agotests: rely on ts_init_py only
Karel Zak [Wed, 23 Apr 2014 10:34:24 +0000 (12:34 +0200)] 
tests: rely on ts_init_py only

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agotests: update fdisk sun test
Karel Zak [Wed, 23 Apr 2014 10:21:29 +0000 (12:21 +0200)] 
tests: update fdisk sun test

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoRevert "dmesg: don't use brow/yellow in output"
Karel Zak [Wed, 23 Apr 2014 09:09:44 +0000 (11:09 +0200)] 
Revert "dmesg: don't use brow/yellow in output"

It will be better to support colors customization than use
ugly blue color. BTW, for example git-log uses brow/yellow too
by default.

This reverts commit 0b6fbc25990d9498956e06bfcf699fca094e24a9.

11 years agotests: add fdisk 'f' command MBR test
Karel Zak [Wed, 23 Apr 2014 07:27:13 +0000 (09:27 +0200)] 
tests: add fdisk 'f' command MBR test

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: (dos) improve logical partition reorder command
Karel Zak [Tue, 22 Apr 2014 19:11:03 +0000 (21:11 +0200)] 
libfdisk: (dos) improve logical partition reorder command

 - use qsort to sort by EBR offsets
 - sort by EBR data partition start sectors

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: (mbr) fix logical chain termination
Karel Zak [Tue, 22 Apr 2014 12:54:44 +0000 (14:54 +0200)] 
libfdisk: (mbr) fix logical chain termination

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agoMerge branch 'test-fdisk' of https://github.com/rudimeier/util-linux
Karel Zak [Tue, 22 Apr 2014 11:11:23 +0000 (13:11 +0200)] 
Merge branch 'test-fdisk' of https://github.com/rudimeier/util-linux

11 years agoswaplabel: Improve the typesetting of the manual
Bjarni Ingi Gislason [Mon, 21 Apr 2014 00:30:27 +0000 (00:30 +0000)] 
swaplabel: Improve the typesetting of the manual

  Change macro 'IR' to 'I' if it has only one (italic) argument

  Remove space at end of lines

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
11 years agosfdisk: Improve the typesetting of the manual
Bjarni Ingi Gislason [Mon, 21 Apr 2014 00:30:26 +0000 (00:30 +0000)] 
sfdisk: Improve the typesetting of the manual

  FIXME
  Units KB, MB, GB, etc. are ambiguous (not necessarily used here)
  Prefixes kilo, mega, giga, etc. are ambiguous with the unit byte (ditto)

  Change ' \- ' to ' \(en ' (an en-dash), if it is a dash (pause,
separation)

  Change ' - ' to ' \(en ' (an en-dash), if it is a dash (pause,
separation)

  Change '\-' to '-' (code "hyphen-minus", rendered with the glyph
hyphen in troff), if it is a part of a compound name.
  A minus is not used in words.  People using UTF-8 and copy-and-paste
can(?) (may?) use "info", "man --ascii" or the command "man" should
have an option to display the '-' ("hyphen-minus") in names of options
with the code (character name) "hyphen-minus" (u002D) instead of
"u2010" (code (character) name "hyphen").

  Change '-' to '\-', if it indicates an option

  Protect a full stop (.), that begins or ends a string, with \&

  Correct space between sentences to two space characters (or begin
each sentence on a new line).

  Change '--' to '\-\-', if it indicates an option

  Add \~ (no-break space) around '|' (means "or")

  Change ' -- ' to ' \(en ' (an en-dash), if it is a dash (pause,
separation)

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
11 years agoraw: Improve the typesetting of the manual
Bjarni Ingi Gislason [Mon, 21 Apr 2014 00:30:25 +0000 (00:30 +0000)] 
raw: Improve the typesetting of the manual

  Remove space at end of lines

  Change '-' to '\-', if it indicates an option

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
11 years agopartx: Improve the typesetting of the manual
Bjarni Ingi Gislason [Mon, 21 Apr 2014 00:30:24 +0000 (00:30 +0000)] 
partx: Improve the typesetting of the manual

  Add a space character around '|' (means "or")

  Add "(hyphen-minus)" after "\-" to show character name for input

  Change '\-\-' to '\en', when it is used as a dash (pause, separation)

  Add a comma before "or" in a series of words (3 or more)

  Change '-' to '\(en' (an en-dash), if it means a range

  Protect a full stop (.), that begins or ends a string, with \&

  Change '--' to '\-\-', if it indicates an option

  Change '-' to '\-', if it indicates an option

  Change '-' to '\-', if means a minus

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
11 years agotests: fdisk added a partitions order message (8b60872e)
Ruediger Meier [Fri, 18 Apr 2014 16:01:26 +0000 (18:01 +0200)] 
tests: fdisk added a partitions order message (8b60872e)

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
11 years agolibfdisk: (gpt) implement 'fix order' commnad
Karel Zak [Fri, 18 Apr 2014 12:00:39 +0000 (14:00 +0200)] 
libfdisk: (gpt) implement 'fix order' commnad

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: add partitions reorder operation to label API
Karel Zak [Fri, 18 Apr 2014 11:26:08 +0000 (13:26 +0200)] 
libfdisk: add partitions reorder operation to label API

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agonsenter: add + to getopt_long()
Karel Zak [Fri, 18 Apr 2014 11:12:24 +0000 (13:12 +0200)] 
nsenter: add + to getopt_long()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agounshare: add + to getopt_long()
Karel Zak [Fri, 18 Apr 2014 11:12:13 +0000 (13:12 +0200)] 
unshare: add + to getopt_long()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agofallocate: add FALLOC_FL_ZERO_RANGE support
Lukas Czerner [Wed, 2 Apr 2014 11:31:05 +0000 (13:31 +0200)] 
fallocate: add FALLOC_FL_ZERO_RANGE support

Recent Linux kernel supports FALLOC_FL_ZERO_RANGE in fallocate(2).
This patch adds FALLOC_FL_ZERO_RANGE support to fallocate utility,
by introducing a new option -z|--zero-range.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
11 years agofallocate: introduce an option -c to support COLLAPSE_RANGE
Dongsu Park [Thu, 27 Feb 2014 10:35:07 +0000 (11:35 +0100)] 
fallocate: introduce an option -c to support COLLAPSE_RANGE

Introduce a new option -c (or --collapse-range) to support a new flag
FALLOC_FL_COLLAPSE_RANGE for fallocate(2). It will nullify a particular
range [offset, offset+len] by shifting extents beyond the range to the
beginning of the hole.

Cc: Lukas Czerner <lczerner@redhat.com>
Cc: Namjae Jeon <namjae.jeon@samsung.com>
Cc: Ashish Sangwan <a.sangwan@samsung.com>
Signed-off-by: Dongsu Park <dongsu.park@profitbricks.com>
11 years agolibsmartcols: fix buffer usage
Karel Zak [Fri, 18 Apr 2014 10:01:59 +0000 (12:01 +0200)] 
libsmartcols: fix buffer usage

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibblkid: make new_partition() more robust
Karel Zak [Fri, 18 Apr 2014 10:01:42 +0000 (12:01 +0200)] 
libblkid: make new_partition() more robust

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: fix logical partition reorder command
Karel Zak [Fri, 18 Apr 2014 09:48:53 +0000 (11:48 +0200)] 
libfdisk: fix logical partition reorder command

Reported-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibfdisk: add generic function to check partitions order
Karel Zak [Wed, 16 Apr 2014 10:51:08 +0000 (12:51 +0200)] 
libfdisk: add generic function to check partitions order

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibsmartcols: don't colorize tree ascii art
Karel Zak [Tue, 15 Apr 2014 13:25:45 +0000 (15:25 +0200)] 
libsmartcols: don't colorize tree ascii art

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolib/mbalign: report also size in bytes
Karel Zak [Tue, 15 Apr 2014 13:25:18 +0000 (15:25 +0200)] 
lib/mbalign: report also size in bytes

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibsmartcols: don't mix width (in cells) and size (in bytes)
Karel Zak [Tue, 15 Apr 2014 12:23:34 +0000 (14:23 +0200)] 
libsmartcols: don't mix width (in cells) and size (in bytes)

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibsmartcols: resuse buffer for encoded data
Karel Zak [Tue, 15 Apr 2014 11:59:46 +0000 (13:59 +0200)] 
libsmartcols: resuse buffer for encoded data

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolib/mbsalign: split mbs_safe_encode()
Karel Zak [Tue, 15 Apr 2014 11:58:34 +0000 (13:58 +0200)] 
lib/mbsalign: split mbs_safe_encode()

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibblkid: fix return codes from PART_ENTRY_* probing
Karel Zak [Tue, 15 Apr 2014 11:09:20 +0000 (13:09 +0200)] 
libblkid: fix return codes from PART_ENTRY_* probing

The partitions prober does two step:

1) probe the assigned device for partition table

2) probe whole-disk device for partition table if the assigned device is a
   partition (this generates PART_ENTRY_* results for blkid -p -o udev))

The step 2) is optional and the return code from this probing should
not override success (rc=0) from the step 1) -- except situations when
the step 2) ends with I/O error or when the step 1) found nothing, but
2) was successful.

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibsmartcols: fix padding
Karel Zak [Mon, 14 Apr 2014 14:59:44 +0000 (16:59 +0200)] 
libsmartcols: fix padding

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agolibsmartcols: use buffer struct in table_print.c
Karel Zak [Mon, 14 Apr 2014 14:41:20 +0000 (16:41 +0200)] 
libsmartcols: use buffer struct in table_print.c

 * consolidate code in table_print.c
 * make the code easy to extend
 * use return codes everywhere

Signed-off-by: Karel Zak <kzak@redhat.com>
11 years agodelpart: minor man page improvements
Ondrej Oprala [Tue, 8 Apr 2014 07:48:49 +0000 (09:48 +0200)] 
delpart: minor man page improvements

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
11 years agocfdisk: minor man page improvements
Ondrej Oprala [Tue, 8 Apr 2014 07:48:48 +0000 (09:48 +0200)] 
cfdisk: minor man page improvements

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>