Commit Graph

10349 Commits

Author SHA1 Message Date
Benno Schulenberg 718b6f0cda fdisk: fix the grammar of an option description
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-17 12:18:54 +01:00
Benno Schulenberg afaf31035d unshare: describe the setgroups restriction more explicitly
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-17 12:18:53 +01:00
Benno Schulenberg c8a550a178 script: tweak spacing and wording, and restore filling in the man page
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-17 12:18:53 +01:00
Benno Schulenberg e71040ce58 lscpu: improve spacing and spelling in the man page
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-17 12:18:52 +01:00
Benno Schulenberg 8722fc38b1 chrt: remove duplicate words and tweak some phrasings in the man page
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-17 12:18:52 +01:00
Ruediger Meier e5fc6d6fb5 lscpu: fix memleak because of ambiguous tags
Now the first one of certain ambiguous tags wins. Alternatively to
this patch we could have called free() before xstrdup().

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-16 14:17:34 +01:00
Ruediger Meier c95e388972 lscpu: use cpu and revision tag if available
Avoid ifdef which does not work with --sysroot. Our existing test
dumps produce even better output now for ppc and sparc.

The logic moved to the printing section.

CC: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-16 14:17:33 +01:00
Ruediger Meier 86c4817e0e Revert "lscpu: keep lscpu usable on snapshots"
This reverts commit 641350fe82.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-16 14:17:33 +01:00
Karel Zak 8a2d738aa1 tests: add new fdisk bsd test
New BDS test based on hexdump, this commit provides:

	bsd_0_64.BE	- generated on ppc64
	bsd_0_64.LE	- generated on ppc64le
	bsd_1_0.LE	- generated on x86_64
	bsd_1_0.BE	- generated on s390

the last missing is Alpha where all is different :-)

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-16 14:01:23 +01:00
Karel Zak 4c48db0b8c tests: mark old bsd fdisk test as deprecated
It seems better to use hexdump rather than md5sum, but it means that
we have to gather hexdumps of the all possible BSD variants. For this
purpose will be introduced a new bsd fdisk test and to verify the
new hexdumps we can use this old test as both tests are exactly the
same.

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-16 13:01:10 +01:00
Benno Schulenberg 0825fe1621 dmesg: improve grammar and consistency of usage text
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-16 10:39:39 +01:00
Benno Schulenberg 9e708d01f3 uuidd: correct the wording of an error message
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-16 10:39:38 +01:00
Benno Schulenberg b779c1aecb mount, umount, swapon, fsck, lsblk, findmnt: harmonize six error messages
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-16 10:39:38 +01:00
Benno Schulenberg 426cdc0ac0 logger: correct the grammar of an error message
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-16 10:39:37 +01:00
Benno Schulenberg 614ddddfc1 libfdisk: (gpt) reword two error messages with a sense of direction
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-16 10:39:37 +01:00
Benno Schulenberg e906ab3c6a libfdisk: (bsd) fix spelling in warning message
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-16 10:39:36 +01:00
Benno Schulenberg cb19f5479b fdisk, cfdisk, sfdisk: improve the grammar of three messages
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-16 10:39:35 +01:00
Benno Schulenberg 1a60a5ecb0 sfdisk: improve the wording of seven error messages
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-16 10:39:34 +01:00
Ruediger Meier 72e948094b tests: fix fdisk/bsd for alpha
There are special __alpha__ ifdefs in libfdisk/src/bsd.c
Regarding 565964a9 and a80886e9.

BTW it was a bad idea to use md5sum. In case of failure it
would be much easier to debug hexdump diffs. Now it's nearly
impossible to collect all these exotic hexdumps.

CC: Andreas Henriksson <andreas@fatal.se>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-16 10:39:34 +01:00
Karel Zak 641350fe82 lscpu: keep lscpu usable on snapshots
This patch reverts 3ac03fe4d2 for
snapshots (--sysroot).

Yeah, poor-man solution. It would be really nice to have runtime
detection to support model overwriting also on snapshots.

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-15 14:23:59 +01:00
Sami Kerola 4cd4b68795 vipw: print only one new line when asking about shadow file
Commit 11b86e1733 changed printf() to puts() in favour of more simple
function, but forgot that puts() adds a new line to end of string.  That new
line is neither needed, or expected, so use fputs() that is both a simple
printing function and comes without new line side effect.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-03-15 14:12:31 +01:00
Karel Zak 40f00b4f8e libmount: improve conversion from root= to the devname
Currently the code supports /dev/name or PARTUUID= only. We also
need to support 'maj:min' and 'hexhex' notations.

Reported-by: George Spelvin <linux@horizon.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-15 14:07:34 +01:00
Karel Zak 12f5cbe159 swapon: remove unnecessary assert
Addresses: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=818252
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-15 11:38:01 +01:00
Karel Zak 83a77afb31 travis: let's ignore apt-get return code
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-14 17:01:25 +01:00
Karel Zak 7830e50df7 docs: add note about libsmartcols Python binding
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-14 16:58:21 +01:00
Vasant Hegde 3ac03fe4d2 lscpu: Fix model and model name on Power Systems
On Power System, lspcu presently displays system model number instead of
processor model name. 'model' tag in cpuinfo contains system model name,
not processor model. Instead it uses 'cpu' tag for processor model name.
Also it uses 'revision' tag for processor model.

Fix lspcu so that it displays processor model number. Also display processor
model name.

cpuinfo output on Power System:
  ...
  ...

  processor	: 127
  cpu		: POWER8E (raw), altivec supported
  clock		: 4322.000000MHz
  revision	: 2.1 (pvr 004b 0201)

  timebase	: 512000000
  platform	: PowerNV
  model		: 8286-42A
  machine	: PowerNV 8286-42A
  firmware	: OPAL

Output without this patch:
  Architecture:          ppc64le
  Byte Order:            Little Endian
  CPU(s):                128
  On-line CPU(s) list:   0-127
  Thread(s) per core:    8
  Core(s) per socket:    4
  Socket(s):             4
  NUMA node(s):          4
  Model:                 8286-42A
  ...
  ...

Output with this patch:
  Architecture:          ppc64le
  Byte Order:            Little Endian
  CPU(s):                128
  On-line CPU(s) list:   0-127
  Thread(s) per core:    8
  Core(s) per socket:    4
  Socket(s):             4
  NUMA node(s):          4
  Model:                 2.1 (pvr 004b 0201)
  Model name:            POWER8E (raw), altivec supported
  ...
  ...

Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
2016-03-14 16:17:19 +01:00
Karel Zak 79d8593fd7 unshare: tiny change
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-14 16:15:04 +01:00
Karel Zak 0ed6e43925 unshare: fix incomplete sentence in man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-14 16:13:23 +01:00
Benno Schulenberg de0f3763c7 unshare: improve wording and formatting in the man page
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-14 16:11:09 +01:00
Benno Schulenberg 295a7aa323 docs: improve grammar and wording in the 2.28 release notes
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-14 16:11:07 +01:00
Benno Schulenberg 99b3fb9eba unshare: replace a special character in the man page with a space
Reported-by: Andreas Henriksson <andreas@fatal.se>
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-14 16:11:05 +01:00
Benno Schulenberg 47f9b35ef4 fallocate: improve synopsis and spelling in man page
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-14 16:11:04 +01:00
Benno Schulenberg 0167ca8215 fallocate: restore man-page content that was deleted in commit 5b033bfd
Reported-by: Andreas Henriksson <andreas@fatal.se>
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-14 16:11:02 +01:00
Karel Zak 11b86e1733 vipw: use puts() when formatting unnecessary
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-14 16:02:17 +01:00
Karel Zak 785539baa3 Merge branch 'travis-osx' of https://github.com/rudimeier/util-linux
* 'travis-osx' of https://github.com/rudimeier/util-linux:
  travis: add OSX build
  travis: switch to Ubuntu 14.04 Trusty
  build-sys: improve uuidd and script build conditions
  build-sys: use AC_PROG_MKDIR_P and remove a few gnuisms
  build-sys: add missing "not found" strings
  build-sys: fix again UL_SCANF_TYPE_MODIFIER
  tests: don't use system's mount commands
  tests: improve skipping of old btrfs-tools
  tests: remove invalid argument in libmount/debug
  tests: skip old socat silently
  misc: fix icc/clang compiler warnings
  misc: fix printf i386 compiler warnings
2016-03-14 15:59:10 +01:00
Karel Zak 0bb5d3a043 tests: make libmount/lock optional
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-14 13:24:54 +01:00
Karel Zak 3d0cf042b0 sulogin: fix sigset_t initialization
Reported-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-03-14 13:21:27 +01:00
Sami Kerola 3ff951f8f3 docs: update AUTHORS file
Former email address has not reached me since summer 2015.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-03-14 13:15:15 +01:00
Sami Kerola 074676470e bash-completion: lsns: add missing completion file
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-03-14 13:15:15 +01:00
Sami Kerola 372221e52b bash-completion: lslogins: add missing completion file
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-03-14 13:15:14 +01:00
Sami Kerola 061e41250f bash-completion: ipcmk: add missing completion file
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-03-14 13:15:14 +01:00
Sami Kerola 5f57e1420c bash-completion: fsck.cramfs, isosize: find files an argument
Earlier completion suggested only options for the command, this changes
options to be proposed when first character of an argument is dash.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2016-03-14 13:15:13 +01:00
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
Ruediger Meier 668d6d2ef9 travis: add OSX build
Of course OSX is not an important target but since it's available on
travis we can (mis)use it to generally improve non-Linux and non-GNU
compatibility. People are using musl, busybox or whatever and
util-linux should work for them. Having OSX build running regularly
will help us to freeze the lately improved BSD compatibility and
to check code which is usually ifdef'ed.

We are using the most recent OSX 10.11.x / Xcode 7.3 though the older
travis OSX images are working too currently.

If it turns out that this OSX build is too annoying when we are about
to add support for latest Linux features then we could add:
  allow_failures:
    - os: osx
to let it fail silently.

Note I've tried hard to keep .travis-functions.sh readable for the
Linux case. I've removed --with-python because it's default anyway,
--enable-gtk-doc is still tested in discheck.

OSX root check would also work (almost, using another --prefix) but
would only run one more test yet (minix).

OSX distcheck would have some issues with conditionally built man
pages and does not work with default distcheck confopts. No need to
fix that because distcheck is more for maintainer machines.

BTW to increase travis build speed again we could remove some targets
from the matrix without losing tested scenarios:
 - nonroot for Linux seems to be waste of time
 - clang/Linux could be root check only
For now we keep it as is.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-13 21:51:18 +01:00
Ruediger Meier fc412fe4ce travis: switch to Ubuntu 14.04 Trusty
Now we have a reasonable recent build system with systemd, etc. We still
keep old Ubuntu 12.04 Precise to check backward compatibility but
remove the hack to install socat.

Note the new env variable PRECISE="yes" is only there to see it on travis
website.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-13 21:48:21 +01:00
Ruediger Meier 651b25cd7f build-sys: improve uuidd and script build conditions
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-13 21:48:16 +01:00
Ruediger Meier 18336d16d9 build-sys: use AC_PROG_MKDIR_P and remove a few gnuisms
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-03-13 21:48:09 +01:00