Commit Graph

10295 Commits

Author SHA1 Message Date
Sami Kerola aeb9298d3e setsid: fix argument count bug
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>
2016-03-14 13:15:13 +01:00
Sami Kerola 5a2ed45309 isosize: stop unmeaningful printing errno message
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>
2016-03-14 13:15:12 +01:00
Sami Kerola 4e5411f623 logger: fix memory leak [ASAN and valgrind]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-03-14 13:15:09 +01:00
Richard Yao 1d01d13eda swapon: fix discard=pages docs
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>
2016-03-14 12:26:28 +01:00
Karel Zak 8c97556ecf build-sys: release++ (v2.28-rc1)
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-11 11:41:05 +01:00
Karel Zak ec9538250c docs: update v2.28-ReleaseNotes
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-11 11:39:28 +01:00
Karel Zak 074c921a4f docs: update AUTHORS file
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-10 15:28:28 +01:00
Karel Zak b5ef147282 po: merge changes
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-10 15:19:25 +01:00
Wylmer Wang befa46018e po: update zh_CN.po (from translationproject.org) 2016-03-10 14:39:45 +01:00
Evgeniy Yakushev 7f7915632f po: update ru.po (from translationproject.org) 2016-03-10 14:39:45 +01:00
Rafael Fontenelle 761352568e po: update pt_BR.po (from translationproject.org) 2016-03-10 14:39:45 +01:00
Philipp Thomas b64eb0055c po: update de.po (from translationproject.org) 2016-03-10 14:39:45 +01:00
Petr Písař cf212426fd po: update cs.po (from translationproject.org) 2016-03-10 14:39:45 +01:00
Karel Zak 9904521903 logger: keep man page consistent and use \- everywhere
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-10 14:36:22 +01:00
Karel Zak 8e2e9144ef misc: remove duplicate includes
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-10 14:30:32 +01:00
Karel Zak 63bae2279a tests: update build-sys tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-10 14:28:30 +01:00
Karel Zak 5bb1d22e8a build-sys: fix if..endif for *_la_LDFLAGS
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-10 13:54:15 +01:00
Karel Zak e6bc81500f Merge branch 'test-btrfs' of https://github.com/rudimeier/util-linux 2016-03-10 12:49:49 +01:00
Karel Zak 95aae4fcee sfdisk, fdisk: add fflush()
Let's add fflush(stdout) before we print to stderr to make output
order more deterministic.

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-10 12:26:43 +01:00
Stanislav Brabec c59409b945 libmount: Typo fix 2016-03-10 11:03:00 +01:00
Karel Zak 9b480fe67b look: consider blanks as directory characters
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>
2016-03-09 15:51:28 +01:00
Ruediger Meier 370d31f724 tests: skip btrfs tests if version too old
Noticed on Debian 7 (Wheezy), btrfs-tools 0.19:
btrfs inspect-internal: unknown token 'rootid'

CC: Stanislav Brabec <sbrabec@suse.cz>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-09 15:47:51 +01:00
Karel Zak edcf032b30 Merge branch 'test-fixes' of https://github.com/rudimeier/util-linux
* 'test-fixes' of https://github.com/rudimeier/util-linux:
  tests: fix non-working udevadm settle for scsi_debug
  tests: hotfix, wait for scsi_debug partion
  tests: don't use mkfs.btrfs option -f
  tests: ignore swapon warnings
  tests: udevadm settle before losetup -d
2016-03-09 15:08:50 +01:00
Ruediger Meier 8d323f0dd6 tests: fix non-working udevadm settle for scsi_debug
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>
2016-03-09 14:41:10 +01:00
Ruediger Meier 6c5fbca17a tests: hotfix, wait for scsi_debug partion
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>
2016-03-09 14:12:19 +01:00
Ruediger Meier 1c28070693 tests: don't use mkfs.btrfs option -f
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>
2016-03-09 13:44:02 +01:00
Karel Zak 322e553a1c Merge branch 'port-osx' of https://github.com/rudimeier/util-linux
* 'port-osx' of https://github.com/rudimeier/util-linux:
  fdisk: fix warning, uninitialized variable
  logger: fix compiler warning, const facilitynames
  include/bitops: avoid fallbacks for more systems
  include/bitops: add casts to bswap functions
2016-03-09 13:12:50 +01:00
Benno Schulenberg b31fd516ff blkdiscard: slice up the recently changed usage text
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-09 12:11:18 +01:00
Benno Schulenberg 8142133441 mount: further improve formatting of the man page
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>
2016-03-09 12:10:52 +01:00
Benno Schulenberg c00043e542 findmnt: improve formatting and wording of the man page
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-09 12:09:27 +01:00
Ruediger Meier 5b4ad40feb tests: ignore swapon warnings
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>
2016-03-09 12:08:58 +01:00
Ruediger Meier 1e5e93e277 tests: udevadm settle before losetup -d
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>
2016-03-09 12:08:58 +01:00
Karel Zak 8f6a58efde misc: avoid shadowing
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-09 12:00:52 +01:00
Karel Zak d404065a82 lib/linux_version: avoid major and minor shadowing
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-09 11:49:42 +01:00
Sami Kerola a3e1c47acc cal: remove libtermcap arguments to my_tgetstr()
Missed in commit b4566a8a8d.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-03-09 11:44:05 +01:00
Sami Kerola 652822e08b misc: remove path name definitions that are unused
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>
2016-03-09 11:44:05 +01:00
Karel Zak deea8ad4a4 tests: mark script race test as "known fail"
Addresses: https://github.com/karelzak/util-linux/issues/296
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-09 11:41:13 +01:00
Ruediger Meier 056e622c91 fdisk: fix warning, uninitialized variable
This was a typo in 4afb337e.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-08 14:56:02 +01:00
Ruediger Meier f5fceb401e logger: fix compiler warning, const facilitynames
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>
2016-03-08 14:55:57 +01:00
Ruediger Meier d20eb029d5 include/bitops: avoid fallbacks for more systems
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-08 14:55:38 +01:00
Ruediger Meier d01c0adb83 include/bitops: add casts to bswap functions
Based on kernel sources include/uapi/linux/swab.h.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-08 14:55:17 +01:00
Karel Zak 075d2c0754 include: move sys/sysmacros.h to c.h
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>
2016-03-08 14:29:45 +01:00
Karel Zak 3fe3f560b7 Revert "include sysmacros.h where used"
This reverts commit 46a40c0184.
2016-03-08 14:26:33 +01:00
Benno Schulenberg bcdf097812 mount: adjust some wordings and formatting in the man page
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-08 14:21:55 +01:00
Benno Schulenberg c805c36923 sfdisk: adjust more wordings and formatting in the man page
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-08 14:21:55 +01:00
Benno Schulenberg c3cd675108 ctrlaltdel: tweak the wording in the man page
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-08 14:21:55 +01:00
Benno Schulenberg 289619bdb6 losetup: correct some formatting in the man page
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-08 14:21:55 +01:00
Benno Schulenberg bed9c1f5e5 mount: hardwrap an overlong example in the man page
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-08 14:21:55 +01:00
Benno Schulenberg bbe6f3cf39 fstrim: a few tiny tweaks of the man page
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-08 14:21:55 +01:00
Benno Schulenberg 2da0d7c0c2 agetty: tweak formatting and some wordings in the man page
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-08 14:21:55 +01:00