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
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.
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.
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>
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)
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.
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.
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.
\- changed 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-pase can(?) (may?) use "info",
"man --ascii" or the command "man" should have an option to display the
- in names of options with the code (character name) "hyphen-minus"
(u002D) instead of "u2010" (code (character) name "hyphen")
Karel Zak [Mon, 7 Apr 2014 09:53:05 +0000 (11:53 +0200)]
mount: fix --all and nofail return code
Now the "nofail" affects warnings warning messages only. That's wrong
and regression (against original non-libmount version). The nofail has
to control return code too.
Reported-by: Patrick McLean <chutzpah@gentoo.org> Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Mon, 7 Apr 2014 07:37:34 +0000 (09:37 +0200)]
Merge branch 'kill' of git://github.com/kerolasa/lelux-utiliteetit
* '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
Karel Zak [Fri, 4 Apr 2014 14:02:35 +0000 (16:02 +0200)]
libfdisk: make qsort_r() optional
The function is no critical for fdisk functionality. The SUN label
verification will check for less issues. All the verification code is
optional ('v' fdisk command).
Dave Reisner [Wed, 2 Apr 2014 14:41:30 +0000 (10:41 -0400)]
switch_root: verify initramfs by f_type, not devno
As of linux 3.14, the initramfs device will have both major and
minor 0, causing our paranoia check to fail. Make this version agnostic
by checking the filesystem type, rather than a device number.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>