]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
5 years agotravis: install all the "official" build dependencies
Evgeny Vereshchagin [Sun, 28 Jun 2020 18:14:40 +0000 (20:14 +0200)] 
travis: install all the "official" build dependencies

5 years agotravis: switch to Bionic
Evgeny Vereshchagin [Sun, 28 Jun 2020 17:58:07 +0000 (19:58 +0200)] 
travis: switch to Bionic

To judge from fc412fe4cee960, back in 2016 it was the latest version
of Ubuntu available on Travis CI. Now build tools there are too old
for testing purposes.

Other than that, Ubuntu Trusty hasn't been supported at https://apt.llvm.org/
since August 2019, which makes it kind of hard at this point to bring the latest clang
along with ASan, UBsan, Msan and libFuzzer to Travis CI.

5 years agolibmount: (parser) fix memory leak on error before end-of-file
Karel Zak [Fri, 26 Jun 2020 10:59:32 +0000 (12:59 +0200)] 
libmount: (parser) fix memory leak on error before end-of-file

Let's simplify the loop where we add FS to the table. The optimization
for recoverable errors is a fragile overkill. The new code always
allocates and unrefs FS for each loop.

Addresses: https://github.com/karelzak/util-linux/pull/1068
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agodocs: mark some branches as github-only
Karel Zak [Wed, 24 Jun 2020 14:38:03 +0000 (16:38 +0200)] 
docs: mark some branches as github-only

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agotests: Fix mountpoint test failure in build chroots.
Mark Hindley [Mon, 22 Jun 2020 23:52:09 +0000 (23:52 +0000)] 
tests: Fix mountpoint test failure in build chroots.

The test assumed that / was a mountpoint. This is not always the case, for
example in pbuilder/cowbuilder chroots. So use / if findmnt verifies it is a
mountpoint, otherwise use the first mountpoint found. Skip the test if no
mountpoints are found.

Signed-off-by: Mark Hindley <mark@hindley.org.uk>
5 years agosys-utils: mount.8: split a long line into two
Bjarni Ingi Gislason [Sun, 21 Jun 2020 22:58:27 +0000 (22:58 +0000)] 
sys-utils: mount.8: split a long line into two

  Split two long lines, adding '\e' at the end of the first part,
as otherwise the last part of them disappears at the right margin in
the printed output (pdf).

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
5 years agoMerge branch 'bug422' of https://github.com/kerolasa/util-linux
Karel Zak [Wed, 24 Jun 2020 13:40:02 +0000 (15:40 +0200)] 
Merge branch 'bug422' of https://github.com/kerolasa/util-linux

5 years agoMerge branch 'some/small/fixes' of https://github.com/lnslbrty/util-linux
Karel Zak [Wed, 24 Jun 2020 13:32:54 +0000 (15:32 +0200)] 
Merge branch 'some/small/fixes' of https://github.com/lnslbrty/util-linux

* 'some/small/fixes' of https://github.com/lnslbrty/util-linux:
  login: fixed invalid sizeof usage
  libfdisk, unshare: fix gcc-4.9.4 warnings

5 years agosetarch: add arm and aarch64 architectures to transition rules
Alexey Gladkov [Tue, 23 Jun 2020 14:56:20 +0000 (16:56 +0200)] 
setarch: add arm and aarch64 architectures to transition rules

Since aarch64 kernel can be configured with compat 32-bit support
enabled, extend translation rules in a way similar to x86/x86_64.

Suggested-by: "Dmitry V. Levin" <ldv@altlinux.org>
Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
5 years agosetarch: make verify_arch_domain extendable
Alexey Gladkov [Tue, 23 Jun 2020 14:56:19 +0000 (16:56 +0200)] 
setarch: make verify_arch_domain extendable

When other compatible architectures are introduced, they will also have
to be added to the verifier.

Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
5 years agocol: fix output when first line does not have newline character
Sami Kerola [Sat, 20 Jun 2020 08:22:24 +0000 (09:22 +0100)] 
col: fix output when first line does not have newline character

Commit I made while back and has been part of util-linux v2.30 to v2.35 made
col(1) not to output anything when first line did not have newline character.

    printf "gone from output" | col

This commit fixes the issue.  Admittedly the col source code is unnecessarily
hard to work with.  It could be a good idea to refactor the col(1) as low
priority task, Assuming refactoring is done the first commit to get that done
should add tests that exhaust all possible input handling including all command
line option directives.

Addresses: https://github.com/karelzak/util-linux/issues/422
Fixes: b6b5272b03ea9d3fa15601801d4d0f76ea4440f1
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
5 years agologin: fixed invalid sizeof usage
Toni Uhlig [Fri, 19 Jun 2020 16:38:15 +0000 (18:38 +0200)] 
login: fixed invalid sizeof usage

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
5 years agolibfdisk, unshare: fix gcc-4.9.4 warnings
Toni Uhlig [Fri, 19 Jun 2020 15:25:25 +0000 (17:25 +0200)] 
libfdisk, unshare: fix gcc-4.9.4 warnings

Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
5 years agobuild-sys: fix blkdiscard blkid.h use
Karel Zak [Fri, 19 Jun 2020 17:04:10 +0000 (19:04 +0200)] 
build-sys: fix blkdiscard blkid.h use

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agolib/sysfs: fix prefix use in sysfs_devname_is_hidden()
Karel Zak [Fri, 19 Jun 2020 08:06:25 +0000 (10:06 +0200)] 
lib/sysfs: fix prefix use in sysfs_devname_is_hidden()

Addresses: https://github.com/karelzak/util-linux/issues/1062
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agoManual pages: losetup.8: Fix "--direct-io" defaults
Rupesh Girase [Thu, 18 Jun 2020 13:47:41 +0000 (19:17 +0530)] 
Manual pages: losetup.8: Fix "--direct-io" defaults

"--direct-io" option is "off" by default while configuring
loop device but it's mentioned "on" in man page.

Signed-off-by: Rupesh Girase <rgirase@redhat.com>
5 years agoblkdiscard: Refuse to proceed if signatures are found
Lukas Czerner [Thu, 18 Jun 2020 10:50:34 +0000 (12:50 +0200)] 
blkdiscard: Refuse to proceed if signatures are found

Currently the blkdiscard has the ability to wipe out entere device in a
matter of seconds. This is fine as long as it's intentional, it is
potentially catastrophic if it's not.

With this commit blkdiscard will check for existing signatures on the
device and refuse to continue if any are found unless the operation is
forced with the -f option.

In an attempt to avoid breaking existing automation scripts the force is
only required when stdin refers to a terminal.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
5 years agounshare: fix man page formatting
Jakub Wilk [Tue, 16 Jun 2020 18:11:38 +0000 (20:11 +0200)] 
unshare: fix man page formatting

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
5 years agologin: cleanup get_hushlogin_status() use
Karel Zak [Tue, 16 Jun 2020 12:00:58 +0000 (14:00 +0200)] 
login: cleanup get_hushlogin_status() use

* use 1 bit for context->quiet
* get_hushlogin_status() return -1 on error, make sure we do not
  interpret it as "hush mode enabled"

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agologin: use PAM_SILENT to propagate hushlogin to PAM
Karel Zak [Tue, 16 Jun 2020 11:49:48 +0000 (13:49 +0200)] 
login: use PAM_SILENT to propagate hushlogin to PAM

login(1) follows /etc/hushlogin and ~/.hushlogin to enable silent
mode, but it's not propagated to PAM now. Note that login(1) from
shadow-utils uses PAM_SILENT too.

Addresses: https://github.com/linux-pam/linux-pam/issues/233
Addresses: https://github.com/karelzak/util-linux/issues/1059
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agotests: cleanup cramfs checksums
Karel Zak [Mon, 15 Jun 2020 09:47:53 +0000 (11:47 +0200)] 
tests: cleanup cramfs checksums

Let's make the code more readable.

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agoMerge branch 'cramfs-mkfs' of https://github.com/mator/util-linux
Karel Zak [Mon, 15 Jun 2020 09:41:17 +0000 (11:41 +0200)] 
Merge branch 'cramfs-mkfs' of https://github.com/mator/util-linux

* 'cramfs-mkfs' of https://github.com/mator/util-linux:
  tests: add checksum for cramfs/mkfs for BE:8192 (sparc64)

5 years agobash-completion: release preparations
Sami Kerola [Fri, 12 Jun 2020 19:29:54 +0000 (20:29 +0100)] 
bash-completion: release preparations

6e103c7690fe blkzone: Add --force option
9cd88771ef45 fdisk: add --lock and LOCK_BLOCK_DEVICE
921ceaca31bd wipefs: add --lock and LOCK_BLOCK_DEVICE
c3ef1268a0b4 sfdisk: add --lock and LOCK_BLOCK_DEVICE
b8671fe76370 mkswap: add --lock and LOCK_BLOCK_DEVICE
ec8f712157fe cfdisk: add --lock and LOCK_BLOCK_DEVICE
f2229320a9f7 fdisk: add --noauto-pt
7f1f0584c24a nsenter: add support for the time namespace
dd52c4fa011d lsirq: add -n option
ee5a16025046 sfdisk: add --relocate command
99d78b2fefe3 fdisk: add --list-details
65e27d545cb5 sfdisk: add --disk-id to change disk UUID/ID
34fed3ff1740 blkdiscard: use O_EXCL, add --force

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
5 years agoManual pages: setpriv.1: warn users of restrictions on capability changes
Michael Kerrisk (man-pages) [Fri, 12 Jun 2020 11:19:33 +0000 (13:19 +0200)] 
Manual pages: setpriv.1: warn users of restrictions on capability changes

The kernel imposes various restrictions on the changes that can be
made to the inheritable, ambient, and bounding sets. Warn the user
about that.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
5 years agoManual pages: setpriv.1: Various minor wording and formatting fixes
Michael Kerrisk (man-pages) [Fri, 12 Jun 2020 11:19:32 +0000 (13:19 +0200)] 
Manual pages: setpriv.1: Various minor wording and formatting fixes

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
5 years agoManual pages: runuser.1: Various wording and formatting fixes
Michael Kerrisk (man-pages) [Fri, 12 Jun 2020 11:19:31 +0000 (13:19 +0200)] 
Manual pages: runuser.1: Various wording and formatting fixes

Most of this is pretty straightforward English language fix-ups
and formatting fix-ups, so I've rolled it into one patch.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
5 years agodoc: text-utils/*: fix some warnings from "mandoc -T lint"
Bjarni Ingi Gislason [Thu, 11 Jun 2020 02:18:20 +0000 (02:18 +0000)] 
doc: text-utils/*: fix some warnings from "mandoc -T lint"

mandoc: ./text-utils/column.1:58:2: WARNING: skipping paragraph macro: PP empty
mandoc: ./text-utils/column.1:63:2: WARNING: skipping paragraph macro: PP empty
mandoc: ./text-utils/column.1:119:2: WARNING: skipping paragraph macro: PP empty
mandoc: ./text-utils/column.1:171:1: WARNING: skipping paragraph macro: sp after PP
mandoc: ./text-utils/column.1:170:2: WARNING: skipping paragraph macro: PP empty

mandoc: ./text-utils/hexdump.1:206:2: WARNING: skipping paragraph macro: PP empty
mandoc: ./text-utils/hexdump.1:356:2: STYLE: fill mode already disabled, skipping: nf
mandoc: ./text-utils/hexdump.1:359:2: STYLE: fill mode already disabled, skipping: nf
mandoc: ./text-utils/hexdump.1:362:2: STYLE: fill mode already disabled, skipping: nf
mandoc: ./text-utils/hexdump.1:366:2: STYLE: fill mode already disabled, skipping: nf
mandoc: ./text-utils/hexdump.1:369:2: STYLE: fill mode already disabled, skipping: nf

####

  There are no changes in the output from "nroff" and "groff", except
for a reformat of a paragraph caused by "fill-mode".

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
5 years agodoc: term-utils/*: fix some warnings from "mandoc -T lint"
Bjarni Ingi Gislason [Thu, 11 Jun 2020 01:26:37 +0000 (01:26 +0000)] 
doc: term-utils/*: fix some warnings from "mandoc -T lint"

mandoc: ./term-utils/agetty.8:224:36: WARNING: undefined escape, printing literally: \\
mandoc: ./term-utils/agetty.8:12:2: STYLE: fill mode already enabled, skipping: fi
mandoc: ./term-utils/agetty.8:307:2: WARNING: skipping paragraph macro: PP empty
mandoc: ./term-utils/agetty.8:489:2: STYLE: fill mode already enabled, skipping: fi
mandoc: ./term-utils/agetty.8:503:2: STYLE: fill mode already enabled, skipping: fi

mandoc: ./term-utils/script.1:198:2: WARNING: skipping paragraph macro: PP empty
mandoc: ./term-utils/script.1:244:2: WARNING: empty block: RS
mandoc: ./term-utils/script.1:261:2: WARNING: skipping paragraph macro: PP empty

mandoc: ./term-utils/scriptlive.1:77:2: STYLE: fill mode already disabled, skipping: nf

mandoc: ./term-utils/scriptreplay.1:122:2: STYLE: fill mode already disabled, skipping: nf

###

  Additional change:

1)  Changed '  ' once to ' ' in "agetty.8"

2)  Change in the output from "groff":

'-' changed to '\-' in "agetty.8".

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
5 years agodoc: sys-utils/*: fix some warnings from "mandoc -T lint"
Bjarni Ingi Gislason [Thu, 11 Jun 2020 00:50:33 +0000 (00:50 +0000)] 
doc: sys-utils/*: fix some warnings from "mandoc -T lint"

mandoc: ./sys-utils/adjtime_config.5:26:1: WARNING: skipping paragraph macro: sp after PP

mandoc: ./sys-utils/chcpu.8:98:2: WARNING: skipping paragraph macro: br at the end of SH

mandoc: ./sys-utils/choom.1:26:22: STYLE: unterminated quoted argument

mandoc: ./sys-utils/dmesg.1:90:5: STYLE: unterminated quoted argument
mandoc: ./sys-utils/dmesg.1:147:5: STYLE: unterminated quoted argument
mandoc: ./sys-utils/dmesg.1:33:2: WARNING: skipping paragraph macro: PP empty
mandoc: ./sys-utils/dmesg.1:255:2: WARNING: skipping paragraph macro: br after sp

mandoc: ./sys-utils/flock.1:183:2: WARNING: line scope broken: TQ breaks TP
mandoc: ./sys-utils/flock.1:43:2: WARNING: skipping paragraph macro: PP after SH

mandoc: ./sys-utils/fsfreeze.8:79:2: WARNING: skipping paragraph macro: PP after SH
mandoc: ./sys-utils/fsfreeze.8:83:2: WARNING: skipping paragraph macro: PP after SH

mandoc: ./sys-utils/ipcmk.1:43:2: WARNING: skipping paragraph macro: PP empty

mandoc: ./sys-utils/lsirq.1:16:11: STYLE: unterminated quoted argument
mandoc: ./sys-utils/lsirq.1:31:11: STYLE: unterminated quoted argument
mandoc: ./sys-utils/lsirq.1:34:11: STYLE: unterminated quoted argument

mandoc: ./sys-utils/mount.8:901:4: STYLE: unterminated quoted argument
mandoc: ./sys-utils/mount.8:2239:38: STYLE: unterminated quoted argument
mandoc: ./sys-utils/mount.8:88:2: WARNING: skipping paragraph macro: br after sp
mandoc: ./sys-utils/mount.8:90:2: WARNING: skipping paragraph macro: br before sp

mandoc: ./sys-utils/mountpoint.1:50:2: WARNING: skipping paragraph macro: PP after SH
mandoc: ./sys-utils/mountpoint.1:57:2: WARNING: skipping paragraph macro: PP after SH

mandoc: ./sys-utils/readprofile.8:10:2: WARNING: skipping paragraph macro: PP after SH
mandoc: ./sys-utils/readprofile.8:100:2: WARNING: skipping paragraph macro: PP after SH

mandoc: ./sys-utils/renice.1:65:11: STYLE: unterminated quoted argument
mandoc: ./sys-utils/renice.1:68:11: STYLE: unterminated quoted argument
mandoc: ./sys-utils/renice.1:72:11: STYLE: unterminated quoted argument
mandoc: ./sys-utils/renice.1:55:2: WARNING: skipping paragraph macro: PP empty

mandoc: ./sys-utils/swapon.8:227:2: WARNING: skipping paragraph macro: br after SH

mandoc: ./sys-utils/unshare.1:350:32: STYLE: unterminated quoted argument
mandoc: ./sys-utils/unshare.1:253:2: WARNING: skipping paragraph macro: PP after SH

####

  The ouput from "nroff" and "groff" is unchanged.

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
5 years agodoc: schedutils/*: Fix some warnings from "mandoc -T lint"
Bjarni Ingi Gislason [Thu, 11 Jun 2020 00:18:44 +0000 (00:18 +0000)] 
doc: schedutils/*: Fix some warnings from "mandoc -T lint"

mandoc: ./schedutils/chrt.1:37:2: WARNING: skipping paragraph macro: PP after SH

mandoc: ./schedutils/ionice.1:120:2: WARNING: skipping paragraph macro: PP empty

mandoc: ./schedutils/taskset.1:36:2: WARNING: skipping paragraph macro: PP after SH

####

  There is no change in the ouput from "nroff" and "groff".

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
5 years agodoc: misc-utils/*: Fix some warnings from "mandoc -T lint"
Bjarni Ingi Gislason [Wed, 10 Jun 2020 23:57:22 +0000 (23:57 +0000)] 
doc: misc-utils/*: Fix some warnings from "mandoc -T lint"

mandoc: ./misc-utils/cal.1:214:2: WARNING: skipping paragraph macro: br after sp
mandoc: ./misc-utils/cal.1:216:2: WARNING: skipping paragraph macro: br before sp
mandoc: ./misc-utils/cal.1:225:2: WARNING: skipping paragraph macro: PP after SH

mandoc: ./misc-utils/findfs.8:36:2: WARNING: skipping paragraph macro: br after sp
mandoc: ./misc-utils/findfs.8:38:2: WARNING: skipping paragraph macro: br before sp
mandoc: ./misc-utils/findfs.8:41:2: WARNING: skipping paragraph macro: br before sp
mandoc: ./misc-utils/findfs.8:44:2: WARNING: skipping paragraph macro: br before sp
mandoc: ./misc-utils/findfs.8:48:2: WARNING: skipping paragraph macro: PP empty

mandoc: ./misc-utils/logger.1:118:15: STYLE: unterminated quoted argument
mandoc: ./misc-utils/logger.1:231:2: WARNING: skipping paragraph macro: IP empty

mandoc: ./misc-utils/look.1:116:2: STYLE: fill mode already disabled, skipping: nf

mandoc: ./misc-utils/hardlink.1:1:5: STYLE: lower case character in document title: TH hardlink
mandoc: ./misc-utils/hardlink.1:1:2: WARNING: missing date, using today's date: TH
mandoc: ./misc-utils/hardlink.1:9:2: WARNING: skipping paragraph macro: PP after SH
mandoc: ./misc-utils/hardlink.1:52:2: WARNING: skipping paragraph macro: PP after SH
mandoc: ./misc-utils/hardlink.1:65:2: WARNING: skipping paragraph macro: PP after SH

mandoc: ./misc-utils/rename.1:65:2: WARNING: skipping paragraph macro: PP empty
mandoc: ./misc-utils/rename.1:65:2: WARNING: skipping paragraph macro: PP empty
mandoc: ./misc-utils/rename.1:97:2: WARNING: skipping paragraph macro: PP empty
mandoc: ./misc-utils/rename.1:107:2: WARNING: skipping paragraph macro: PP empty
mandoc: ./misc-utils/rename.1:116:2: WARNING: skipping paragraph macro: PP empty

mandoc: ./misc-utils/whereis.1:82:2: WARNING: line scope broken: IP breaks TP
mandoc: ./misc-utils/whereis.1:152:2: WARNING: skipping paragraph macro: PP empty

####

  There is no change in the ouput of "nroff" or "groff", except for

1) a very long line in "logger.1".

2) '-' changed to '\-' for a option in "logger.1".

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
5 years agodoc: login-utils/*: Fix some warnings from "mandoc -T lint"
Bjarni Ingi Gislason [Wed, 10 Jun 2020 22:49:59 +0000 (22:49 +0000)] 
doc: login-utils/*: Fix some warnings from "mandoc -T lint"

mandoc: ./login-utils/chfn.1:96:2: WARNING: skipping paragraph macro: PP empty

mandoc: ./login-utils/lslogins.1:14:2: WARNING: skipping paragraph macro: PP after SH

mandoc: ./login-utils/newgrp.1:18:2: WARNING: skipping paragraph macro: PP empty

mandoc: ./login-utils/nologin.8:19:2: WARNING: skipping paragraph macro: PP empty

mandoc: ./login-utils/sulogin.8:57:2: WARNING: skipping paragraph macro: PP empty

mandoc: ./login-utils/utmpdump.1:61:2: WARNING: skipping paragraph macro: PP after SS

mandoc: ./login-utils/vipw.8:65:2: WARNING: line scope broken: TP breaks I

####

  There is no change in output from "nroff" or "groff".

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
5 years agodoc: libuuid/man/*: Fix some warnings from "mandoc -T lint"
Bjarni Ingi Gislason [Wed, 10 Jun 2020 22:27:39 +0000 (22:27 +0000)] 
doc: libuuid/man/*: Fix some warnings from "mandoc -T lint"

mandoc: ./libuuid/man/uuid_generate.3:44:101: STYLE: unterminated quoted argument

mandoc: ./libuuid/man/uuid_generate.3:45:102: STYLE: unterminated quoted argument

####

  There is no change in the output of "nroff" or "groff".

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
5 years agodoc: disk-utils/*: Fix some warnings from "mandoc -T lint"
Bjarni Ingi Gislason [Wed, 10 Jun 2020 21:49:10 +0000 (21:49 +0000)] 
doc: disk-utils/*: Fix some warnings from "mandoc -T lint"

mandoc: ./disk-utils/fsck.minix.8:123:2: WARNING: skipping paragraph macro: PP empty

mandoc: ./disk-utils/isosize.8:8:2: WARNING: skipping paragraph macro: PP after SH

mandoc: ./disk-utils/sfdisk.8:262:4: STYLE: unterminated quoted argument

mandoc: ./disk-utils/swaplabel.8:57:2: WARNING: skipping paragraph macro: PP empty

####

  No change in the output from "nroff" or "groff".

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
####

5 years agotests: add checksum for cramfs/mkfs for BE:8192 (sparc64)
Anatoly Pugachev [Thu, 11 Jun 2020 11:25:04 +0000 (14:25 +0300)] 
tests: add checksum for cramfs/mkfs for BE:8192 (sparc64)

Signed-off-by: Anatoly Pugachev <matorola@gmail.com>
5 years agotests: explain why MD tests with metadata v0.90 are KNOWN-FAIL
Karel Zak [Thu, 11 Jun 2020 09:05:30 +0000 (11:05 +0200)] 
tests: explain why MD tests with metadata v0.90 are KNOWN-FAIL

metadata v0.90 is deprecated thing and unsupported to create by some new
mdadm versions. It's possible to assemble this array (with
default_layout=1 on modprobe raid0), but impossible to create a new
one.

References: 4ae96cf77b36660255d5870a4209480bbec47902
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1826251
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agoMerge branch 'fix_typo' of https://github.com/s-morishima/util-linux
Karel Zak [Wed, 10 Jun 2020 08:26:39 +0000 (10:26 +0200)] 
Merge branch 'fix_typo' of https://github.com/s-morishima/util-linux

5 years agodoc: Fix some warnings from "test-groff" for manuals
Bjarni Ingi Gislason [Wed, 10 Jun 2020 02:17:50 +0000 (02:17 +0000)] 
doc: Fix some warnings from "test-groff" for manuals

Source is current git content.

Output is from: test-groff -b -e -mandoc -T utf8 -rF0 -t -w w -z

  [ "test-groff" is a developmental version of "groff" ]

Input file is ././disk-utils/sfdisk.8

troff: backtrace: file '<./disk-utils/sfdisk.8>':67
troff: <./disk-utils/sfdisk.8>:67: warning: trailing space

Input file is ././misc-utils/kill.1

troff: backtrace: '/home/bg/git/groff/build/s-tmac/an-ext.tmac':133: macro 'EE'
troff: backtrace: file '<./misc-utils/kill.1>':167
troff: <./misc-utils/kill.1>:167: warning: macro 'mF' not defined
troff: backtrace: '/home/bg/git/groff/build/s-tmac/an-ext.tmac':134: macro 'EE'
troff: backtrace: file '<./misc-utils/kill.1>':167
troff: <./misc-utils/kill.1>:167: warning: number register 'mE' not defined
troff: backtrace: '/home/bg/git/groff/build/s-tmac/an-ext.tmac':134: macro 'EE'
troff: backtrace: file '<./misc-utils/kill.1>':167
troff: <./misc-utils/kill.1>:167: warning: bad font number
troff: backtrace: '/home/bg/git/groff/build/s-tmac/an-ext.tmac':135: macro 'EE'
troff: backtrace: file '<./misc-utils/kill.1>':167
troff: <./misc-utils/kill.1>:167: warning: number register 'sP' not defined
troff: backtrace: '/home/bg/git/groff/build/s-tmac/an-ext.tmac':134: macro 'EE'
troff: backtrace: file '<./misc-utils/kill.1>':170
troff: <./misc-utils/kill.1>:170: warning: bad font number

Input file is ././sys-utils/ipcs.1

<./sys-utils/ipcs.1>:103 (macro BR): only 1 argument, but more are expected

Input file is ././sys-utils/mount.8

<./sys-utils/mount.8>:68 (macro RB): only 1 argument, but more are expected
troff: backtrace: '/home/bg/git/groff/build/s-tmac/an-old.tmac':467: macro 'RB'
troff: backtrace: file '<./sys-utils/mount.8>':68
troff: <./sys-utils/mount.8>:68: warning [p 1, 3.5i]: can't break line
an-old.tmac: <./sys-utils/mount.8>:201 (.RE): warning: extra .RE or .RS is missing before it; "an-RS-open" is 0.
<./sys-utils/mount.8>:453 (macro BR): only 1 argument, but more are expected
<./sys-utils/mount.8>:500 (macro BR): only 1 argument, but more are expected
<./sys-utils/mount.8>:1050 (macro BR): only 1 argument, but more are expected

Input file is ././sys-utils/setpriv.1

<./sys-utils/setpriv.1>:17 (macro BR): only 1 argument, but more are expected
<./sys-utils/setpriv.1>:154 (macro BR): only 1 argument, but more are expected
<./sys-utils/setpriv.1>:166 (macro BR): only 1 argument, but more are expected

Input file is ././sys-utils/umount.8

<./sys-utils/umount.8>:145 (macro IR): only 1 argument, but more are expected

Input file is ././sys-utils/unshare.1

<./sys-utils/unshare.1>:266 (macro BR): only 1 argument, but more are expected

[kzak@redhat.com: - add .RS to fix extra .RE in mount.8]

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agoManual page: fdisk.8: fix typo
Shigeki Morishima [Wed, 3 Jun 2020 19:23:30 +0000 (04:23 +0900)] 
Manual page: fdisk.8: fix typo

It seems that "--wipe-partitions" is correct, not "--wipe-partition".

Signed-off-by: Shigeki Morishima <s.morishima@jp.fujitsu.com>
5 years agobuild-sys: release++ (v2.36-rc1) v2.36-rc1
Karel Zak [Tue, 9 Jun 2020 12:55:55 +0000 (14:55 +0200)] 
build-sys: release++ (v2.36-rc1)

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agodocs: fix release notes file name
Karel Zak [Tue, 9 Jun 2020 13:11:58 +0000 (15:11 +0200)] 
docs: fix release notes file name

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agodocs: add v2.36-ReleaseNotes
Karel Zak [Tue, 9 Jun 2020 12:28:23 +0000 (14:28 +0200)] 
docs: add v2.36-ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agodocs: update AUTHORS file
Karel Zak [Tue, 9 Jun 2020 09:51:51 +0000 (11:51 +0200)] 
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agopo: merge changes
Karel Zak [Tue, 9 Jun 2020 09:49:28 +0000 (11:49 +0200)] 
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agolib/strutils: use directly err()
Karel Zak [Tue, 9 Jun 2020 09:45:55 +0000 (11:45 +0200)] 
lib/strutils: use directly err()

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agopo: update hr.po (from translationproject.org)
Božidar Putanec [Tue, 9 Jun 2020 09:35:01 +0000 (11:35 +0200)] 
po: update hr.po (from translationproject.org)

5 years agologindefs: use xalloc.h, code cleanup
Karel Zak [Tue, 9 Jun 2020 09:31:42 +0000 (11:31 +0200)] 
logindefs: use xalloc.h, code cleanup

- remove else-after-return
- use else-if
- use xalloc stuff

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agolib/strutils: remove unnecessary include
Karel Zak [Tue, 9 Jun 2020 08:56:28 +0000 (10:56 +0200)] 
lib/strutils: remove unnecessary include

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agotests: add STATIC binaries to build-sys tests
Karel Zak [Tue, 9 Jun 2020 08:55:20 +0000 (10:55 +0200)] 
tests: add STATIC binaries to build-sys tests

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agobuild-sys: remove redundard includes
Karel Zak [Tue, 9 Jun 2020 08:53:14 +0000 (10:53 +0200)] 
build-sys: remove redundard includes

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agolibblkid: (docs) document new function
Karel Zak [Tue, 9 Jun 2020 08:51:37 +0000 (10:51 +0200)] 
libblkid: (docs) document new function

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agolibfdisk: (docs) document new functions
Karel Zak [Tue, 9 Jun 2020 08:50:42 +0000 (10:50 +0200)] 
libfdisk: (docs) document new functions

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agomount: Update man page Synopsis
Marcel Waldvogel [Mon, 8 Jun 2020 12:30:03 +0000 (14:30 +0200)] 
mount: Update man page Synopsis

Document
- `-t` when listing mounts
- `--bind`, `--rbind`, and `--move`
- `--make-*`
- Mountpoints need not only be directories

[kzak@redhat.com: - cleanup syntax,
  - use all complete --make-* list]

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agotests: update build-sys tests
Karel Zak [Mon, 8 Jun 2020 11:29:33 +0000 (13:29 +0200)] 
tests: update build-sys tests

- remove libasan from results
- link libcryptsetup (due to verity support in libmount)
- add lsiqr
- add irqtop

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agobuild-sys: fix irqtop compilation with -lslang
Karel Zak [Mon, 8 Jun 2020 11:18:20 +0000 (13:18 +0200)] 
build-sys: fix irqtop compilation with -lslang

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agotests: don't use ASAN in build tests
Karel Zak [Mon, 8 Jun 2020 09:45:09 +0000 (11:45 +0200)] 
tests: don't use ASAN in build tests

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agobuild-sys: make lsirq and irqtop optional
Karel Zak [Mon, 8 Jun 2020 09:33:00 +0000 (11:33 +0200)] 
build-sys: make lsirq and irqtop optional

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agolscpu: cleanup caches code
Karel Zak [Mon, 8 Jun 2020 08:05:14 +0000 (10:05 +0200)] 
lscpu: cleanup caches code

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agolscpu: Add shared cached info for s390 lscpu -C
Sumanth Korikkar [Fri, 5 Jun 2020 16:15:10 +0000 (18:15 +0200)] 
lscpu: Add shared cached info for s390 lscpu -C

The shared cache info for s390 can be found in /proc/cpuinfo.
lscpu without any options already processes this info. Fix this
in lscpu -C and provide detailed stat.

Test for s390:
./lscpu -C
NAME ONE-SIZE ALL-SIZE WAYS TYPE        LEVEL  SETS PHY-LINE COHERENCY-SIZE
L1d      128K     256K    8 Data            1    64                     256
L1i      128K     256K    8 Instruction     1    64                     256
L2d        4M       8M    8 Data            2  2048                     256
L2i        2M       4M    8 Instruction     2  1024                     256
L3       128M            32 Unified         3 16384                     256
L4       672M            42 Unified         4 65536                     256

Signed-off-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
5 years agoblockdev: Don't fail on missing start sector
Stanislav Brabec [Fri, 5 Jun 2020 08:04:21 +0000 (10:04 +0200)] 
blockdev: Don't fail on missing start sector

It causes
 # blockdev --report" error:
 blockdev: /dev/dm-9: failed to read partition start from sysfs: No such file or directory

There is no reliable way to detect a geometry in this case. Report N/A
instead.

Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
Cc: Martin Wilck <martin.wilck@suse.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agoblkzone: remove unnecessary initializations
Karel Zak [Fri, 5 Jun 2020 07:18:08 +0000 (09:18 +0200)] 
blkzone: remove unnecessary initializations

C compiler is smart enough to follow C standards

 C11: 6.7.8 Initialization

 All subobjects that are not initialized explicitly shall be
 initialized implicitly the same as objects that have static storage
 duration.

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agoblkzone: Add --force option
Shin'ichiro Kawasaki [Fri, 5 Jun 2020 05:06:18 +0000 (14:06 +0900)] 
blkzone: Add --force option

Commit 7a2602f629fe ("blkzone: deny destructive ioctls on busy blockdev")
introduced exclusive mode to open block devices to submit zone management
ioctls. This avoids unintended status change of block devices used by the
system. However, it makes blkzone less usable for testing. For example,
the test case zbd/007 of blktests utilizes blkzone to reset zones of
block devices mapped to dm-linear devices. After the commit, the test
case fails with EBUSY error at blkzone reset, since the system uses the
reset target block device to map to the dm-linear device.

To allow blkzone to change status of zoned block devices used by the
system with intention, introduce --force option. With this option, block
devices are opened without exclusive mode.

Also fix too many periods in man page of --verbose option.

[kzak@redhat.com: - tiny cosmetic changes]

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agodmesg: adjust timestamps according to suspended time
Konstantin Khlebnikov [Mon, 1 Jun 2020 19:21:34 +0000 (22:21 +0300)] 
dmesg: adjust timestamps according to suspended time

Timestamps in kernel log comes from monotonic clocksource which does not
tick when system suspended. Suspended time easily sums into hours and days
rendering human readable timestamps in dmesg useless.

Adjusting timestamps accouring to current delta between boottime and
monotonic clocksources produces accurate timestamps for messages printed
since last resume. Which are supposed to be most interesting.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
5 years agoManual pages: unshare.1: clarify that --pid=<file> requires --fork
Michael Kerrisk (man-pages) [Wed, 3 Jun 2020 07:40:57 +0000 (09:40 +0200)] 
Manual pages: unshare.1: clarify that --pid=<file> requires --fork

Attempting to create a persistent PID namespace with --pid=<file>
will result in an error if --fork is not also specified. Let's
warn people about that, so they don't get puzzled.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agoManual pages: unshare.1: clarify description and example for --mount=<path>
Michael Kerrisk (man-pages) [Wed, 3 Jun 2020 07:40:56 +0000 (09:40 +0200)] 
Manual pages: unshare.1: clarify description and example for --mount=<path>

The existing text is not quite accurate, and I recently injected an
error into the EXAMPLES. This patch fixes both issues.

The text in DESCRIPTION incorrectly states that the propagation type of
the parent mount must be "private". This is not accurate.  Rather, the
propagation type must be something *other than "shared"* (i.e.,
"private", "slave", or "unbindable").

In the EXAMPLES section, I added text that implies that if the
propagation type of the parent mount is "shared", then the child mount
created by --mount=<path> might propagate to another namespace.
Rather, in this situation, an error would result. Clarify that.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
5 years agolibmount: add support for ID=
Karel Zak [Wed, 3 Jun 2020 14:53:00 +0000 (16:53 +0200)] 
libmount: add support for ID=

This patch add support for a new tag. The tag is based on udev block
device ID (see /dev/disk/by-id). The usual use-case is to use
WWN for this purpose, for example

  # mount ID=wwn-0x50026b724b09a1ff /mnt

Note that ID is not strictly defined and udevd generates various IDs
also for HW where WWN is undefined. This is reason why introduce ID=
seems better and more generic than more restrictive WWN=.

Addresses: https://github.com/karelzak/util-linux/issues/1008
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agomount: (man) cleanup devices identifiers section
Karel Zak [Mon, 1 Jun 2020 12:53:47 +0000 (14:53 +0200)] 
mount: (man) cleanup devices identifiers section

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agologin: cleanup -f in usage() and comments
Karel Zak [Mon, 1 Jun 2020 08:33:29 +0000 (10:33 +0200)] 
login: cleanup -f in usage() and comments

Let's remove unnecessary comment and "second authentication" from
usage().

Addresses: https://github.com/karelzak/util-linux/issues/1053
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agodmesg: add --follow-new
Konstantin Khlebnikov [Sat, 30 May 2020 14:07:53 +0000 (17:07 +0300)] 
dmesg: add --follow-new

Option --follow-new (-W) works the same as --follow (-w) but initially
seeks to the end of kernel ring buffer, so it prints only new messages.
Useful for capturing kernel messages during actions without past log.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
5 years agologin: fix -f description in the man-page
Karel Zak [Fri, 29 May 2020 12:50:36 +0000 (14:50 +0200)] 
login: fix -f description in the man-page

Addresses: https://github.com/karelzak/util-linux/issues/1053
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agoManual pages: mount.8: Miscellaneous wording, grammar, and formatting fixes
Michael Kerrisk (man-pages) [Fri, 29 May 2020 12:20:48 +0000 (14:20 +0200)] 
Manual pages: mount.8: Miscellaneous wording, grammar, and formatting fixes

Most of these are "obviously correct":
- formatting fixes
- improved English wordings
- add missing articles ("a", "the")
- a few spelling fixes
- a few "obvious" corrections to the text

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
5 years agoManual pages: wording fix: "another" ==> "other"
Michael Kerrisk (man-pages) [Fri, 29 May 2020 12:20:47 +0000 (14:20 +0200)] 
Manual pages: wording fix: "another" ==> "other"

In several pages, there is a consistent wording problem: "another"
where "other" should be used. This wording problem can be
surprisingly confusing for native speakers, especially those
unaware that in some other languages, "another" and "other" can be
expressed with the same word.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
5 years agobuild-sys: add missing LDADD to blkid test
Karel Zak [Fri, 29 May 2020 07:54:48 +0000 (09:54 +0200)] 
build-sys: add missing LDADD to blkid test

Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agoManual pages: umount.8: use "filesystem" consistently
Michael Kerrisk (man-pages) [Thu, 28 May 2020 14:58:23 +0000 (16:58 +0200)] 
Manual pages: umount.8: use "filesystem" consistently

Currently, this page has a mix of "filesystem" and file system",
with the former being predominant.  Let's settle on one.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
5 years agoManual pages: mount.8: Rewrite FILESYSTEM-SPECIFIC MOUNT OPTIONS intro
Michael Kerrisk (man-pages) [Thu, 28 May 2020 14:58:22 +0000 (16:58 +0200)] 
Manual pages: mount.8: Rewrite FILESYSTEM-SPECIFIC MOUNT OPTIONS intro

Add a table listing other manual pages that describe mount options
of some widely used filesystems. Additionally, rewrite the remaining
text to be a bit easier to read.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
5 years agoManual pages: mount.8: Typo fix (remove an accidental paragraph break)
Michael Kerrisk (man-pages) [Thu, 28 May 2020 14:58:21 +0000 (16:58 +0200)] 
Manual pages: mount.8: Typo fix (remove an accidental paragraph break)

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
5 years agoManual pages: mount.8: SEE ALSO: add some obvious references
Michael Kerrisk (man-pages) [Thu, 28 May 2020 14:58:20 +0000 (16:58 +0200)] 
Manual pages: mount.8: SEE ALSO: add some obvious references

And correct sort order for "umount(8)" entry.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
5 years agoManual pages: mount.8, umount.8: Consistently format pathnames with italic
Michael Kerrisk (man-pages) [Thu, 28 May 2020 14:58:19 +0000 (16:58 +0200)] 
Manual pages: mount.8, umount.8: Consistently format pathnames with italic

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
5 years agoManual pages: mount.8, umount.8: Clarify that "namespace" means "mount namespace"
Michael Kerrisk (man-pages) [Thu, 28 May 2020 14:58:18 +0000 (16:58 +0200)] 
Manual pages: mount.8, umount.8: Clarify that "namespace" means "mount namespace"

There are various references to "namespaces" when it would be
clearer to say "mount namespaces". Also, add references to the
mount_namespaces(7) manual page.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
5 years agoManual pages: setpriv.1: Minor formatting and typo fixes
Michael Kerrisk (man-pages) [Thu, 28 May 2020 14:58:17 +0000 (16:58 +0200)] 
Manual pages: setpriv.1: Minor formatting and typo fixes

These seem all "obviously correct", so I'm rolling them up
into one patch.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
5 years agoManual pages: unshare.1: typo fix
Michael Kerrisk (man-pages) [Thu, 28 May 2020 14:58:16 +0000 (16:58 +0200)] 
Manual pages: unshare.1: typo fix

(Introduced in one of my earlier commits)

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
5 years agoManual pages: unshare.1: EXAMPLES: improve persistent mount namespace example
Michael Kerrisk (man-pages) [Thu, 28 May 2020 14:58:15 +0000 (16:58 +0200)] 
Manual pages: unshare.1: EXAMPLES: improve persistent mount namespace example

The text describing the persistent mount namespace example
is rather confused. Explain more clearly the purpose of making
the parent directory a bind mount with private propagation.
Also make a few other wording improvements.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
5 years agosetarch: fix stderr handling in uname26 tests
Helge Deller [Wed, 27 May 2020 23:20:58 +0000 (23:20 +0000)] 
setarch: fix stderr handling in uname26 tests

A while ago stdout and stderr have been split in these testcases, but
"FATAL: kernel too old" is actually treated as an "okay" output. However
this FATAL ends up on stderr, so when it happens, it is not seen in
the captured stdout.

Fix this by merging stdout/stderr in these cases once again.

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Chris Hofstaedtler <zeha@debian.org>
Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=961639
Fixes: cbf858aa085e25aa5afd1d06decaea6e14a8963f
5 years agoManual pages: rename EXAMPLE section to EXAMPLES
Michael Kerrisk (man-pages) [Mon, 25 May 2020 12:59:12 +0000 (14:59 +0200)] 
Manual pages: rename EXAMPLE section to EXAMPLES

Earlier, I patched various pages to consistently use EXAMPLE as a
section heading, rather than EXAMPLES.  (At that time, both headings
occurred in util-linux, with roughly equal frequency.)

Since then, I've observed that EXAMPLES is the more common usage
across a large corpus of manual pages. So, in Linux the man-pages
project, I switched to using EXAMPLES also. This patch makes the same
change for util-linux.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
5 years agoMan pages: ipcmk.1, ipcs.1, lsipc.1: explicitly mention "System V"
Michael Kerrisk (man-pages) [Mon, 25 May 2020 12:59:11 +0000 (14:59 +0200)] 
Man pages: ipcmk.1, ipcs.1, lsipc.1: explicitly mention "System V"

Explicitly mention "System V" in the description, so that readers do not
get confused with the POSIX IPC mechanisms.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
5 years agoManual pages: ipcmk.1, ipcrm.1, ipcs.1, lsipc.1: SEE ALSO: add sysvipc(7)
Michael Kerrisk (man-pages) [Mon, 25 May 2020 12:59:10 +0000 (14:59 +0200)] 
Manual pages: ipcmk.1, ipcrm.1, ipcs.1, lsipc.1: SEE ALSO: add sysvipc(7)

These commands all relate to System V IPC, so point the reader
at the relevant Section 7 page provided by the Linux man-pages
project.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
5 years agoManual pages: kill.1: improve the description of the --timout option
Michael Kerrisk (man-pages) [Mon, 25 May 2020 12:59:09 +0000 (14:59 +0200)] 
Manual pages: kill.1: improve the description of the --timout option

The text describing this option is a little hard to understand.
Improve it.

Cc: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
5 years agoManual pages: kill.1: various language, spelling, and formatting fixes
Michael Kerrisk (man-pages) [Mon, 25 May 2020 12:59:08 +0000 (14:59 +0200)] 
Manual pages: kill.1: various language, spelling, and formatting fixes

These seem all "obviously correct", so I'm rolling them up into
one patch.

Signed-off-by: Michael Kerrisk (man-pages) <mtk.manpages@gmail.com>
5 years agoswapoff: do not use 1 exist status at all
Karel Zak [Thu, 28 May 2020 10:51:26 +0000 (12:51 +0200)] 
swapoff: do not use 1 exist status at all

The make sure we are not in collision with old versions.

Addresses: https://github.com/karelzak/util-linux/issues/1050
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agoswapoff: cleanup EXIT STATUS
Karel Zak [Wed, 27 May 2020 16:58:30 +0000 (18:58 +0200)] 
swapoff: cleanup EXIT STATUS

The current code hides details about reason why swapoff(8) and swapoff(2) failed. For example
ENOMEM from swapoff(2) is important as it indicates OOM.

The patch also clean ups --all return codes to be more compatible for
example with [u]mount --all, etc.

Addresses: https://github.com/karelzak/util-linux/issues/1050
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agolibfdisk: (dos) be more explicit in fdisk_verify_disklabel() output
Karel Zak [Wed, 27 May 2020 15:46:49 +0000 (17:46 +0200)] 
libfdisk: (dos) be more explicit in fdisk_verify_disklabel() output

Let's print number of detected errors or "No errors detected." for
MBR. We already use the same for GPT.

The patch also modifies fdisk_verify_disklabel() return code to inform
caller about number of issues.

Addresses: https://github.com/karelzak/util-linux/issues/1051
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agofdisk: add --lock and LOCK_BLOCK_DEVICE
Karel Zak [Wed, 27 May 2020 14:58:08 +0000 (16:58 +0200)] 
fdisk: add --lock and LOCK_BLOCK_DEVICE

Addresses: https://github.com/karelzak/util-linux/issues/921
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agowipefs: add --lock and LOCK_BLOCK_DEVICE
Karel Zak [Wed, 27 May 2020 14:58:08 +0000 (16:58 +0200)] 
wipefs: add --lock and LOCK_BLOCK_DEVICE

Addresses: https://github.com/karelzak/util-linux/issues/921
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agosfdisk: add --lock and LOCK_BLOCK_DEVICE
Karel Zak [Wed, 27 May 2020 14:58:08 +0000 (16:58 +0200)] 
sfdisk: add --lock and LOCK_BLOCK_DEVICE

Addresses: https://github.com/karelzak/util-linux/issues/921
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agomkswap: add --lock and LOCK_BLOCK_DEVICE
Karel Zak [Wed, 27 May 2020 14:58:08 +0000 (16:58 +0200)] 
mkswap: add --lock and LOCK_BLOCK_DEVICE

Addresses: https://github.com/karelzak/util-linux/issues/921
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agocfdisk: add --lock and LOCK_BLOCK_DEVICE
Karel Zak [Wed, 27 May 2020 14:58:08 +0000 (16:58 +0200)] 
cfdisk: add --lock and LOCK_BLOCK_DEVICE

Addresses: https://github.com/karelzak/util-linux/issues/921
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agolib/blkdev: add support for --lock and LOCK_BLOCK_DEVICE
Karel Zak [Tue, 26 May 2020 15:21:04 +0000 (17:21 +0200)] 
lib/blkdev: add support for --lock and LOCK_BLOCK_DEVICE

All simple function to parse --lock <mode> and $LOCK_BLOCK_DEVICE,
and to flock the fd.

The supported <mode> is:

"1" or "yes" - LOCK_EX
"0" or "no" - do nothing
"nonblock" - LOCK_EX | LOCK_NB

The function tries LOCK_NB before the solo LOCK_EX and prints
inform user that it will wait, for example:

session A:
# sfdisk --lock /dev/sdc

session B:
# sfdisk --lock /dev/sdc
sfdisk: /dev/sdc: device already locked, waiting to get lock ...
^C

# sfdisk --lock=nonblock /dev/sdc
sfdisk: /dev/sdc: device already locked

Addresses: https://github.com/karelzak/util-linux/issues/921
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agobuild-sys: add $LDADD and libcommon to test_logindefs_LDADD
Karel Zak [Tue, 26 May 2020 09:43:07 +0000 (11:43 +0200)] 
build-sys: add $LDADD and libcommon to test_logindefs_LDADD

Addresses: https://travis-ci.org/github/karelzak/util-linux/jobs/690915120
Signed-off-by: Karel Zak <kzak@redhat.com>
5 years agomore: avoid libmagic telling an empty file is binary
Sami Kerola [Mon, 25 May 2020 07:30:24 +0000 (08:30 +0100)] 
more: avoid libmagic telling an empty file is binary

My earlier change that took libmagic in use to identify mime-type of an input
file caused empty files to be marked binary.  Before the change empty files
were simply displayed as empty.  This change will restore that behavior.

Addresses: 09070e1a658e70ec203150e4fa5f486b32771858
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
5 years agoManual pages: unshare.1: fix examples, part 3
Michael Kerrisk [Sat, 23 May 2020 06:43:25 +0000 (08:43 +0200)] 
Manual pages: unshare.1: fix examples, part 3

The time namespaces example had no explanatory text!  Add some.
Also, use the "uptime -p" option for output that is more compact
(and perhaps more readable).

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>