The below demonstrates what happen before this change.
$ setsid --wait
setsid: child 3252 did not exit normally: Success
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Earlier printout had strange looking 'Success'.
$ isosize --sectors /dev/urandom
isosize: /dev/urandom: might not be an ISO filesystem
isosize: 733error: le=-1971599244 be=1633181607: Success
...
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
The documentation for discard=pages is ambiguous in that it could be
interpreted to mean either that the pages are discarded immediately
after being freed or that the pages are discarded immediately before
being reused by a write. Both implementations would satisfy the
statement "discard freed swap pages before they are avaliable for
reuse", but the kernel does the former.
Doing a discard operation (which is non-queued on SATA drives before
SATA 3.1) before a write operation to the same sector is pointless
unless using, pre-SATA 3.1 drives, where discard is detrimental because
ATA TRIM is a non-queued command.
Anyone who wants discard operations on swap and interprets the man page
as describing the incorrect behavior would opt for discard=once over
discard, when discard provides the behavior of both discard=once and
discard=pages, which is what they likely want.
Lets make a small change to the documentation to clarify the behavior.
Signed-off-by: Richard Yao <ryao@gentoo.org>
This change introduces regression, but it seems better than to be
incompatible with "sort -d" if we assume that "sort -d" is the right
way how to prepare files for look(1).
It seems (from man page) that the original goal has been compatibility
with sort -d, but this feature has never been fully implemented.
Addresses: https://github.com/karelzak/util-linux/issues/284
Signed-off-by: Karel Zak <kzak@redhat.com>
We don't sleep anymore since 01b38917. This does not work
on Debian 7 (wheezy)/linux-3.2. Is it the kernel's or udev's
fault?
We simmply add a better sleep again plus some todos for later
improvements.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Maybe we shouldn't use scsi_debug's num_parts=1 but fdisk to
add a partion. This seems to work better with udevadm settle.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
btrfs-tools 0.19 does not have option -f but looks like we don't need
it in this test.
CC: Stanislav Brabec <sbrabec@suse.cz>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Mainly by using proper subsections (so they can be indexed),
protecting some things from hyphenation, and marking with \&
periods that don't end sentences. Tweaking some wordings too.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
swapon/mkswap warns if system sets different permissions for
loop devices.
I saw this on Debian 7 (wheezy)/linux-3.2:
mkswap: /dev/loop0: insecure permissions 1660, 0660 suggested.
swapon: /dev/loop0: insecure permissions 1660, 0660 suggested.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
On Debian 7 (wheezy)/linux-3.2 we need "udevadm settle" between
losetup and losetup -d in case that the backing file is a block
device (scsi_debug).
This issue is visible since:
7e604f3c tests: don't skip case "output undefined"
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
After this commit the following produces zero matches.
$ for i in \
_PATH_DEV_TTY \
_PATH_INITTAB \
_PATH_MNTTAB_DIR \
_PATH_MOUNTED_LOCK \
_PATH_MOUNTED_TMP \
_PATH_RC \
_PATH_REBOOT \
_PATH_SECURE \
_PATH_SECURETTY \
_PATH_SHUTDOWN_CONF \
_PATH_SINGLE \
_PATH_UMOUNT \
_PATH_USERTTY
do git grep $i; done
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This was the warning on FreeBSD:
misc-utils/logger.c:221:24: warning: passing 'const CODE [25]' to parameter of type 'CODE *' (aka 'struct _code *') discards qualifiers
[-Wincompatible-pointer-types-discards-qualifiers]
facility = decode(s, facilitynames);
^~~~~~~~~~~~~
misc-utils/logger.c:187:43: note: passing argument to parameter 'codetab' here
static int decode(const char *name, CODE *codetab)
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
The file is no portable (#ifdef HAVE_SYS_SYSMACROS_H is necessary),
but needed on many places. It seems better to keep it in c.h.
Signed-off-by: Karel Zak <kzak@redhat.com>