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: 4c85aa3a4c
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
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: 404fa3f93c
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
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>
* '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
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>
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>
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>
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 0b6fbc2599.
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>
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>
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>
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>
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>