]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
8 years agopo: merge changes
Karel Zak [Tue, 29 Mar 2016 08:38:01 +0000 (10:38 +0200)] 
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agopo: update ja.po (from translationproject.org)
Takeshi Hamasaki [Tue, 29 Mar 2016 08:34:55 +0000 (10:34 +0200)] 
po: update ja.po (from translationproject.org)

8 years agoMerge branch 'tests-setarch' of https://github.com/rudimeier/util-linux
Karel Zak [Thu, 24 Mar 2016 08:54:54 +0000 (09:54 +0100)] 
Merge branch 'tests-setarch' of https://github.com/rudimeier/util-linux

* 'tests-setarch' of https://github.com/rudimeier/util-linux:
  tests: improve setarch tests, regarding --uname-2.6 issues
  setarch: add "exec" message to --verbose
  build-sys: ignore vim .swp files

8 years agotests: improve setarch tests, regarding --uname-2.6 issues
Ruediger Meier [Tue, 22 Mar 2016 09:06:22 +0000 (10:06 +0100)] 
tests: improve setarch tests, regarding --uname-2.6 issues

Add some more tests:
  * error handling "unknown arch" and "unknown command"
  * "noop" test with host arch and no other options
  * all options except --uname-2.6
  * --uname-2.6 whithout any other options but handle fatal
    glibc error "kernel too old" (with debug output)
  * add a "real" --uname-2.6 test which validates uname(1)
    output

Note the "kernel too old" cases are systems where glibc was
configured to support only kernels > 3.0. On some archs
(e.g. x86) --uname-2.6 still works with such glibc because
2.6.39 had all needed features on board (e.g. vdso).
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=806911

Some people reported segfaults (after execvp) but I can only
reproduce it on arm* and aarch64 qemu-user-space builds. We
don't need to fix our tests for such broken systems where
also many other tests fail currently.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
8 years agolsipc: don't free shm data if no shm id is found
Romain Naour [Tue, 22 Mar 2016 21:19:54 +0000 (22:19 +0100)] 
lsipc: don't free shm data if no shm id is found

There is a segfault in do_shm_global() when ipc_shm_get_info() return 0 and
ipc_shm_free_info() is called.

When no shm id is found, the memory allocated in shmds by ipc_shm_get_info() is
already free when ipc_shm_free_info() is called.

Move ipc_shm_free_info(shmds) inside the if statement where at least one shm id
is found.

Signed-off-by: Romain Naour <romain.naour@gmail.com>
8 years agolibblkid: Update for newer bcache superblocks
Kent Overstreet [Tue, 15 Mar 2016 02:44:36 +0000 (18:44 -0800)] 
libblkid: Update for newer bcache superblocks

Later version of bcache add different checksum types, and allow for superblocks
greater than 4k - skipping the checksum check (as in most other probes) is the
easiest solution.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
8 years agopartx: fix --nr usage
Karel Zak [Tue, 22 Mar 2016 14:49:00 +0000 (15:49 +0100)] 
partx: fix --nr usage

Reported-by: Serge van den Boom <serge+util-linux@vdboom.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agosetarch: add "exec" message to --verbose
Ruediger Meier [Tue, 22 Mar 2016 11:14:45 +0000 (12:14 +0100)] 
setarch: add "exec" message to --verbose

Also we don't need fflush() in non-verbose case.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
8 years agobuild-sys: ignore vim .swp files
Ruediger Meier [Tue, 22 Mar 2016 13:11:25 +0000 (14:11 +0100)] 
build-sys: ignore vim .swp files

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
8 years agosulogin: Always make echo work after performing getpasswd even if root account is...
Werner Fink [Tue, 22 Mar 2016 09:38:59 +0000 (10:38 +0100)] 
sulogin: Always make echo work after performing getpasswd even if root account is locked

If the root account is locked and no password was provided then the terminal
line is not set back to do echo of the input. This correct a small overlook
in commit 7ff1162e67164cb4ece19dd809c26272461aa254

Signed-off-by: Werner Fink <werner@suse.de>
8 years agolscpu: revert unnecessary path_exist()
Karel Zak [Tue, 22 Mar 2016 09:31:16 +0000 (10:31 +0100)] 
lscpu: revert unnecessary path_exist()

The features file is there from 2.6.31 when Xen has been added to
kernel. Sorry.

Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agodocs: update TODO file
Karel Zak [Tue, 22 Mar 2016 09:26:35 +0000 (10:26 +0100)] 
docs: update TODO file

Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agolscpu: correct the Virtualization type on Xen DomU PV guest
Dongli Zhang [Tue, 22 Mar 2016 05:38:14 +0000 (13:38 +0800)] 
lscpu: correct the Virtualization type on Xen DomU PV guest

Nowadays, most Intel CPUs have "cpuid faulting" available which could trap
the execution of "cpuid" instruction when CPL>0  with GP fault. Thus,
"cpuid" instruction could trap to Xen hypervisor on the paravirtualized PV
guest on most servers today, except on old CPUs prior to 2011. On CPU after
2011, Xen will put "XenVMMXenVMM" on both HVM and PV guests, which could
have lscpu command erroneously classify the guest as type "full".  The
current lscpu command, which is based on "cpuid" instruction, still assumes
that it will not cause the trap to Xen hypervisor on Xen PV guest and uses
/proc/xen to identify whether it's running on PV DomU or not.  To identify
this kind of information under the help of
/sys/hypervisor/properties/features would be more accurate for the CPU
nowadays. The bit 5 (XENFEAT_mmu_pt_update_preserve_ad) of the features
will be set only when it's running on Xen PV domain. The combo of bit 3 and
8 (XENFEAT_supervisor_mode_kernel and XENFEAT_hvm_callback_vector) will be
set simultaneously only when it's running on Xen PVH domain.

[kzak@redhat.com: - add path_exist()]

Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agodocs: add note about CLONE_NEWCGROUP support
Karel Zak [Mon, 21 Mar 2016 20:13:25 +0000 (21:13 +0100)] 
docs: add note about CLONE_NEWCGROUP support

The patch has been planned for weeks and now the kernel part is
already in Linus' tree. It's a new feature, but it's probably better
to merge the userspace stuff now (v2.28 rc1) than wait next 6 months
for the next util-linux release.

Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agoMerge branch '2016-03-02/cgns' of https://github.com/hallyn/util-linux
Karel Zak [Mon, 21 Mar 2016 20:08:05 +0000 (21:08 +0100)] 
Merge branch '2016-03-02/cgns' of https://github.com/hallyn/util-linux

* '2016-03-02/cgns' of https://github.com/hallyn/util-linux:
  Implement support for cgroup namespaces

8 years agoipcs: consolidate output header printing
Ruediger Meier [Mon, 21 Mar 2016 13:04:45 +0000 (14:04 +0100)] 
ipcs: consolidate output header printing

Print a warning (instead of header) if --limits fails, like we did
it in past (2.20.1) and like we are still doing for --summary. Note
in past we were printing the same message like for --summary
"kernel not configured for ...", but actually this message is not
really correct.

This patch simply consolidates the current behavior. Probably we
should refactor it regarding warnings (stderr) and exit codes.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
8 years agotests: skip ipcs test which require /proc
Ruediger Meier [Mon, 21 Mar 2016 13:04:44 +0000 (14:04 +0100)] 
tests: skip ipcs test which require /proc

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
8 years agosulogin: ignore missing WEXITED, add warning
Ruediger Meier [Mon, 21 Mar 2016 13:04:43 +0000 (14:04 +0100)] 
sulogin: ignore missing WEXITED, add warning

This happens on Debian kFreeBSD and probably on Hurd too since
cde7699c. One should review this issue to fix it properly.

CC: Werner Fink <werner@suse.de>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
8 years agobuild-sys: pylibmount, mount context is Linux only
Ruediger Meier [Mon, 21 Mar 2016 13:04:42 +0000 (14:04 +0100)] 
build-sys: pylibmount, mount context is Linux only

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
8 years agobuild-sys: some libmount test progs are Linux only
Ruediger Meier [Mon, 21 Mar 2016 13:04:41 +0000 (14:04 +0100)] 
build-sys: some libmount test progs are Linux only

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
8 years agoipcs: --shmems, upward/backward compatibility
Ruediger Meier [Fri, 18 Mar 2016 11:49:18 +0000 (12:49 +0100)] 
ipcs: --shmems, upward/backward compatibility

Re-add backward compatibility which got lost in 058e8154.
Initializing unknown struct members to 0xdead is similar to
the fallback.

For upward compatibility ignore columns > 16 but not the whole
line (in case the kernel would add more columns in future).

Reported-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
8 years agoipcs: make sure to parse whole lines for shm_data
Ruediger Meier [Fri, 18 Mar 2016 11:49:17 +0000 (12:49 +0100)] 
ipcs: make sure to parse whole lines for shm_data

We want to parse 16 columns _per_row_ without mixing them up. The
existing code is unsafe for more or less columns and could even
run into endless loops. This patch assures that we parse row-wise
and really skip lines with columns != 16.

Probably somehow we could have also done this with fscanf() only.
Using fgets() additionally makes the code more easy to read and
to improve later.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
8 years agoswapon: rewrite control struct usage
Karel Zak [Fri, 18 Mar 2016 13:28:29 +0000 (14:28 +0100)] 
swapon: rewrite control struct usage

The old version has been pretty broken... the most important is to
keep swap options specified on command line as read-only template.
For example if we call "swapon --all" then we cannot modify the global
options for each fstab swap entry.

The another story has been control struct modification due to device
reinitialization etc.

This patch splits all to:

* struct swapon_control; top-level struct with command line options

* struct swap_device; this is device specific and never globally
  maintained by swapon_control.

* struct swap_prop; used as global read-only template swap options
  and per device swap options (when parse fstab).

Addresses: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=818252
Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agotests: check for TS_HELPER_SYSINFO in swap tests
Karel Zak [Fri, 18 Mar 2016 13:24:44 +0000 (14:24 +0100)] 
tests: check for TS_HELPER_SYSINFO in swap tests

Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agodocs: add to TODO file
Karel Zak [Fri, 18 Mar 2016 11:05:51 +0000 (12:05 +0100)] 
docs: add to TODO file

Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agotools: add missing checkcompletion.sh
Karel Zak [Thu, 17 Mar 2016 13:34:29 +0000 (14:34 +0100)] 
tools: add missing checkcompletion.sh

Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agotests: ignore setarch on sparc
Karel Zak [Thu, 17 Mar 2016 13:32:07 +0000 (14:32 +0100)] 
tests: ignore setarch on sparc

Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agotools: add checkcompletion.sh
Karel Zak [Thu, 17 Mar 2016 13:05:27 +0000 (14:05 +0100)] 
tools: add checkcompletion.sh

The command "make checkcompletion" prints missing completion scripts.

Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agoumount: add man page note that --force is not perfect
Karel Zak [Thu, 17 Mar 2016 11:19:31 +0000 (12:19 +0100)] 
umount: add man page note that --force is not perfect

Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agobuild-sys: no need to un-ignore tracked files
Ruediger Meier [Thu, 17 Mar 2016 10:04:05 +0000 (11:04 +0100)] 
build-sys: no need to un-ignore tracked files

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
8 years agobuild-sys: install missing bash completions
Ruediger Meier [Thu, 17 Mar 2016 10:04:06 +0000 (11:04 +0100)] 
build-sys: install missing bash completions

We haven't installed these files since three years. Hopefully
they will work.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
8 years agodocs: miscellaneous tiny tweaks of man pages
Benno Schulenberg [Thu, 17 Mar 2016 09:54:31 +0000 (10:54 +0100)] 
docs: miscellaneous tiny tweaks of man pages

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
8 years agofdisk: fix the grammar of an option description
Benno Schulenberg [Thu, 17 Mar 2016 09:39:14 +0000 (10:39 +0100)] 
fdisk: fix the grammar of an option description

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
8 years agounshare: describe the setgroups restriction more explicitly
Benno Schulenberg [Thu, 17 Mar 2016 09:39:13 +0000 (10:39 +0100)] 
unshare: describe the setgroups restriction more explicitly

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
8 years agoscript: tweak spacing and wording, and restore filling in the man page
Benno Schulenberg [Thu, 17 Mar 2016 09:39:12 +0000 (10:39 +0100)] 
script: tweak spacing and wording, and restore filling in the man page

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
8 years agolscpu: improve spacing and spelling in the man page
Benno Schulenberg [Thu, 17 Mar 2016 09:39:11 +0000 (10:39 +0100)] 
lscpu: improve spacing and spelling in the man page

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
8 years agochrt: remove duplicate words and tweak some phrasings in the man page
Benno Schulenberg [Thu, 17 Mar 2016 09:39:10 +0000 (10:39 +0100)] 
chrt: remove duplicate words and tweak some phrasings in the man page

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
8 years agolscpu: fix memleak because of ambiguous tags
Ruediger Meier [Wed, 16 Mar 2016 12:18:19 +0000 (13:18 +0100)] 
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>
8 years agolscpu: use cpu and revision tag if available
Ruediger Meier [Wed, 16 Mar 2016 12:18:18 +0000 (13:18 +0100)] 
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>
8 years agoRevert "lscpu: keep lscpu usable on snapshots"
Ruediger Meier [Wed, 16 Mar 2016 12:18:17 +0000 (13:18 +0100)] 
Revert "lscpu: keep lscpu usable on snapshots"

This reverts commit 641350fe822e7f1ac10873dad9a364bdeaba8083.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
8 years agotests: add new fdisk bsd test
Karel Zak [Wed, 16 Mar 2016 12:42:08 +0000 (13:42 +0100)] 
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>
8 years agotests: mark old bsd fdisk test as deprecated
Karel Zak [Wed, 16 Mar 2016 12:01:10 +0000 (13:01 +0100)] 
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>
8 years agodmesg: improve grammar and consistency of usage text
Benno Schulenberg [Wed, 16 Mar 2016 08:55:55 +0000 (09:55 +0100)] 
dmesg: improve grammar and consistency of usage text

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
8 years agouuidd: correct the wording of an error message
Benno Schulenberg [Wed, 16 Mar 2016 08:55:54 +0000 (09:55 +0100)] 
uuidd: correct the wording of an error message

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
8 years agomount, umount, swapon, fsck, lsblk, findmnt: harmonize six error messages
Benno Schulenberg [Wed, 16 Mar 2016 08:55:53 +0000 (09:55 +0100)] 
mount, umount, swapon, fsck, lsblk, findmnt: harmonize six error messages

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
8 years agologger: correct the grammar of an error message
Benno Schulenberg [Wed, 16 Mar 2016 08:55:52 +0000 (09:55 +0100)] 
logger: correct the grammar of an error message

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
8 years agolibfdisk: (gpt) reword two error messages with a sense of direction
Benno Schulenberg [Wed, 16 Mar 2016 08:55:51 +0000 (09:55 +0100)] 
libfdisk: (gpt) reword two error messages with a sense of direction

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
8 years agolibfdisk: (bsd) fix spelling in warning message
Benno Schulenberg [Wed, 16 Mar 2016 08:55:50 +0000 (09:55 +0100)] 
libfdisk: (bsd) fix spelling in warning message

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
8 years agofdisk, cfdisk, sfdisk: improve the grammar of three messages
Benno Schulenberg [Wed, 16 Mar 2016 08:55:49 +0000 (09:55 +0100)] 
fdisk, cfdisk, sfdisk: improve the grammar of three messages

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
8 years agosfdisk: improve the wording of seven error messages
Benno Schulenberg [Wed, 16 Mar 2016 08:55:48 +0000 (09:55 +0100)] 
sfdisk: improve the wording of seven error messages

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
8 years agotests: fix fdisk/bsd for alpha
Ruediger Meier [Wed, 16 Mar 2016 00:40:44 +0000 (01:40 +0100)] 
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>
8 years agolscpu: keep lscpu usable on snapshots
Karel Zak [Tue, 15 Mar 2016 13:23:59 +0000 (14:23 +0100)] 
lscpu: keep lscpu usable on snapshots

This patch reverts 3ac03fe4d20558b55635a048d7f2fb0f5e85ee2a 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>
8 years agovipw: print only one new line when asking about shadow file
Sami Kerola [Mon, 14 Mar 2016 21:38:30 +0000 (21:38 +0000)] 
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>
8 years agolibmount: improve conversion from root= to the devname
Karel Zak [Tue, 15 Mar 2016 13:02:19 +0000 (14:02 +0100)] 
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>
8 years agoswapon: remove unnecessary assert
Karel Zak [Tue, 15 Mar 2016 10:38:01 +0000 (11:38 +0100)] 
swapon: remove unnecessary assert

Addresses: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=818252
Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agotravis: let's ignore apt-get return code
Karel Zak [Mon, 14 Mar 2016 16:01:25 +0000 (17:01 +0100)] 
travis: let's ignore apt-get return code

Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agodocs: add note about libsmartcols Python binding
Karel Zak [Mon, 14 Mar 2016 15:58:21 +0000 (16:58 +0100)] 
docs: add note about libsmartcols Python binding

Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agolscpu: Fix model and model name on Power Systems
Vasant Hegde [Mon, 14 Mar 2016 14:48:07 +0000 (20:18 +0530)] 
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>
8 years agounshare: tiny change
Karel Zak [Mon, 14 Mar 2016 15:15:04 +0000 (16:15 +0100)] 
unshare: tiny change

Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agounshare: fix incomplete sentence in man page
Karel Zak [Mon, 14 Mar 2016 15:13:23 +0000 (16:13 +0100)] 
unshare: fix incomplete sentence in man page

Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agounshare: improve wording and formatting in the man page
Benno Schulenberg [Mon, 14 Mar 2016 10:05:59 +0000 (11:05 +0100)] 
unshare: improve wording and formatting in the man page

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
8 years agodocs: improve grammar and wording in the 2.28 release notes
Benno Schulenberg [Mon, 14 Mar 2016 09:10:13 +0000 (10:10 +0100)] 
docs: improve grammar and wording in the 2.28 release notes

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
8 years agounshare: replace a special character in the man page with a space
Benno Schulenberg [Mon, 14 Mar 2016 09:10:12 +0000 (10:10 +0100)] 
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>
8 years agofallocate: improve synopsis and spelling in man page
Benno Schulenberg [Mon, 14 Mar 2016 09:10:11 +0000 (10:10 +0100)] 
fallocate: improve synopsis and spelling in man page

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
8 years agofallocate: restore man-page content that was deleted in commit 5b033bfd
Benno Schulenberg [Mon, 14 Mar 2016 09:10:10 +0000 (10:10 +0100)] 
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>
8 years agovipw: use puts() when formatting unnecessary
Karel Zak [Mon, 14 Mar 2016 15:02:06 +0000 (16:02 +0100)] 
vipw: use puts() when formatting unnecessary

Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agoMerge branch 'travis-osx' of https://github.com/rudimeier/util-linux
Karel Zak [Mon, 14 Mar 2016 14:59:10 +0000 (15:59 +0100)] 
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

8 years agotests: make libmount/lock optional
Karel Zak [Mon, 14 Mar 2016 12:24:54 +0000 (13:24 +0100)] 
tests: make libmount/lock optional

Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agosulogin: fix sigset_t initialization
Karel Zak [Mon, 14 Mar 2016 12:21:27 +0000 (13:21 +0100)] 
sulogin: fix sigset_t initialization

Reported-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agodocs: update AUTHORS file
Sami Kerola [Sun, 13 Mar 2016 10:31:49 +0000 (10:31 +0000)] 
docs: update AUTHORS file

Former email address has not reached me since summer 2015.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
8 years agobash-completion: lsns: add missing completion file
Sami Kerola [Sun, 13 Mar 2016 10:31:48 +0000 (10:31 +0000)] 
bash-completion: lsns: add missing completion file

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
8 years agobash-completion: lslogins: add missing completion file
Sami Kerola [Sun, 13 Mar 2016 10:31:47 +0000 (10:31 +0000)] 
bash-completion: lslogins: add missing completion file

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
8 years agobash-completion: ipcmk: add missing completion file
Sami Kerola [Sun, 13 Mar 2016 10:31:46 +0000 (10:31 +0000)] 
bash-completion: ipcmk: add missing completion file

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
8 years agobash-completion: fsck.cramfs, isosize: find files an argument
Sami Kerola [Sun, 13 Mar 2016 10:31:45 +0000 (10:31 +0000)] 
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>
8 years agosetsid: fix argument count bug
Sami Kerola [Sun, 13 Mar 2016 10:31:44 +0000 (10:31 +0000)] 
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>
8 years agoisosize: stop unmeaningful printing errno message
Sami Kerola [Sun, 13 Mar 2016 10:31:43 +0000 (10:31 +0000)] 
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>
8 years agologger: fix memory leak [ASAN and valgrind]
Sami Kerola [Sun, 13 Mar 2016 10:31:40 +0000 (10:31 +0000)] 
logger: fix memory leak [ASAN and valgrind]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
8 years agoswapon: fix discard=pages docs
Richard Yao [Fri, 11 Mar 2016 22:03:27 +0000 (17:03 -0500)] 
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>
8 years agotravis: add OSX build
Ruediger Meier [Sat, 12 Mar 2016 22:45:00 +0000 (23:45 +0100)] 
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>
8 years agotravis: switch to Ubuntu 14.04 Trusty
Ruediger Meier [Sat, 12 Mar 2016 22:44:50 +0000 (23:44 +0100)] 
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>
8 years agobuild-sys: improve uuidd and script build conditions
Ruediger Meier [Sun, 13 Mar 2016 20:14:08 +0000 (21:14 +0100)] 
build-sys: improve uuidd and script build conditions

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
8 years agobuild-sys: use AC_PROG_MKDIR_P and remove a few gnuisms
Ruediger Meier [Sun, 13 Mar 2016 19:47:26 +0000 (20:47 +0100)] 
build-sys: use AC_PROG_MKDIR_P and remove a few gnuisms

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
8 years agobuild-sys: add missing "not found" strings
Ruediger Meier [Sun, 13 Mar 2016 04:46:07 +0000 (05:46 +0100)] 
build-sys: add missing "not found" strings

Otherwise configure output looks like this:
  configure: WARNING:  not found; not building cfdisk

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
8 years agobuild-sys: fix again UL_SCANF_TYPE_MODIFIER
Ruediger Meier [Sun, 13 Mar 2016 02:19:26 +0000 (03:19 +0100)] 
build-sys: fix again UL_SCANF_TYPE_MODIFIER

This reverts commit c8494d88:
  "build-sys: fix UL_SCANF_TYPE_MODIFIER for icc"

plus fix the check prog, because it found "%as" to be valid on
systems where "%a" is used for float conversion.

icc warns about "%ms" but it works anyways. Our AC_RUN_IFELSE prog
should do it right now regardless of compiler warnings.

Note "%ms" is POSIX.1-2008 standard but still not available on
many systems. Maybe it's time to remove "%as" fallback for old
glibc which is even less portable.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
8 years agotests: don't use system's mount commands
Ruediger Meier [Sun, 13 Mar 2016 05:07:16 +0000 (06:07 +0100)] 
tests: don't use system's mount commands

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
8 years agotests: improve skipping of old btrfs-tools
Ruediger Meier [Sat, 12 Mar 2016 11:23:32 +0000 (12:23 +0100)] 
tests: improve skipping of old btrfs-tools

Older Linux distributions came with differently incomplete
btrfs-tools 0.19+git versions (2009-2013). Old mkfs.btrfs
needs minimum device size 256M.

Note the most simple way to skip btrfs-tools < 3.14 would be
  btrfs property --help 2>&1 || ts_skip "btrfs too old"
but I want to include 3.12 because of Ubuntu Trusty on travis.

This patch partly reverts/rewrites the following commits:
7e604f3c - tests: don't skip case "output undefined"
076153f8 - tests: don't compare btrfs mount options
370d31f7 - tests: skip btrfs tests if version too old

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
8 years agotests: remove invalid argument in libmount/debug
Ruediger Meier [Thu, 10 Mar 2016 10:29:09 +0000 (11:29 +0100)] 
tests: remove invalid argument in libmount/debug

This was usually no problem because of unsafe strtoul(3) usage in
test prog libmount/src/init.c. But musl's strtoul sets errno if
no digit was found in the argument.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
8 years agotests: skip old socat silently
Ruediger Meier [Wed, 9 Mar 2016 17:15:25 +0000 (18:15 +0100)] 
tests: skip old socat silently

I've seen enough logs with verbose socat output for now. Let's
make it quiet.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
8 years agomisc: fix icc/clang compiler warnings
Ruediger Meier [Sat, 12 Mar 2016 22:55:48 +0000 (23:55 +0100)] 
misc: fix icc/clang compiler warnings

clang warning:
libmount/src/tab.c:1833:6: warning: variable 'rc' is used uninitialized whenever
      'if' condition is true [-Wsometimes-uninitialized]
        if (!mpc)
            ^~~~

icc printf warnings:
    libmount/src/monitor.c(348): warning #2279: printf/scanf format not a string literal and no format arguments
            DBG(MONITOR, ul_debugobj(mn, status == 1 ? " success" : " nothing"));
            ^
    login-utils/vipw.c(348): warning #2279: printf/scanf format not a string literal and no format arguments
                           : _("You are using shadow passwords on this system.\n"));
                                                                                  ^

icc enum warnings:
    disk-utils/fdisk-menu.c(150): warning #188: enumerated type mixed with another type
            .exclude = FDISK_DISKLABEL_GPT | FDISK_DISKLABEL_BSD,
                       ^
    libsmartcols/src/table_print.c(750): warning #188: enumerated type mixed with another type
                            &width, align,
                                    ^

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
8 years agomisc: fix printf i386 compiler warnings
Ruediger Meier [Wed, 9 Mar 2016 16:56:58 +0000 (17:56 +0100)] 
misc: fix printf i386 compiler warnings

Still a few printf warnings found on i386 Linux:

libfdisk/src/alignment.c: In function 'fdisk_align_lba':
libfdisk/src/alignment.c:115:3: warning: format '%ju' expects argument of type 'uintmax_t', but argument 6 has type 'long unsigned int' [-Wformat]
sys-utils/lsns.c: In function ‘add_namespace’:
sys-utils/lsns.c:346:2: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘ino_t’ [-Wformat]
sys-utils/lsns.c: In function ‘add_process_to_namespace’:
sys-utils/lsns.c:362:2: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘ino_t’ [-Wformat]
sys-utils/lsns.c: In function ‘add_scols_line’:
sys-utils/lsns.c:440:4: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘ino_t’ [-Wformat]

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
8 years agobuild-sys: release++ (v2.28-rc1) v2.28-rc1
Karel Zak [Fri, 11 Mar 2016 10:41:05 +0000 (11:41 +0100)] 
build-sys: release++ (v2.28-rc1)

Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agodocs: update v2.28-ReleaseNotes
Karel Zak [Fri, 11 Mar 2016 10:39:28 +0000 (11:39 +0100)] 
docs: update v2.28-ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agodocs: update AUTHORS file
Karel Zak [Thu, 10 Mar 2016 14:28:28 +0000 (15:28 +0100)] 
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agopo: merge changes
Karel Zak [Thu, 10 Mar 2016 14:19:25 +0000 (15:19 +0100)] 
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
8 years agopo: update zh_CN.po (from translationproject.org)
Wylmer Wang [Thu, 10 Mar 2016 13:39:45 +0000 (14:39 +0100)] 
po: update zh_CN.po (from translationproject.org)

8 years agopo: update ru.po (from translationproject.org)
Evgeniy Yakushev [Thu, 10 Mar 2016 13:39:45 +0000 (14:39 +0100)] 
po: update ru.po (from translationproject.org)

8 years agopo: update pt_BR.po (from translationproject.org)
Rafael Fontenelle [Thu, 10 Mar 2016 13:39:45 +0000 (14:39 +0100)] 
po: update pt_BR.po (from translationproject.org)

8 years agopo: update de.po (from translationproject.org)
Philipp Thomas [Thu, 10 Mar 2016 13:39:45 +0000 (14:39 +0100)] 
po: update de.po (from translationproject.org)

8 years agopo: update cs.po (from translationproject.org)
Petr Písař [Thu, 10 Mar 2016 13:39:45 +0000 (14:39 +0100)] 
po: update cs.po (from translationproject.org)

8 years agologger: keep man page consistent and use \- everywhere
Karel Zak [Thu, 10 Mar 2016 13:33:45 +0000 (14:33 +0100)] 
logger: keep man page consistent and use \- everywhere

Signed-off-by: Karel Zak <kzak@redhat.com>