]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
3 years agowdctl: add --setpretimeout
Karel Zak [Tue, 19 Oct 2021 07:47:44 +0000 (09:47 +0200)] 
wdctl: add --setpretimeout

Addresses: https://github.com/karelzak/util-linux/issues/1475
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agoblockdev: remove accidental non-breaking spaces
Chris Hofstaedtler [Mon, 18 Oct 2021 07:40:01 +0000 (07:40 +0000)] 
blockdev: remove accidental non-breaking spaces

commit 9147d2ad8abb73cea5799323fc73ccdaf675826f introduced these
C2A0 spaces, but without saying anything. Likely this was an
accident.

Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=996751
Signed-off-by: Chris Hofstaedtler <zeha@debian.org>
3 years agomcookie: fix infinite-loop when use -f
Hiroaki Sengoku [Fri, 15 Oct 2021 05:02:46 +0000 (14:02 +0900)] 
mcookie: fix infinite-loop when use -f

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agobuild-sys: patch libtool.m4 for darwin
Karel Zak [Thu, 14 Oct 2021 10:17:31 +0000 (12:17 +0200)] 
build-sys: patch libtool.m4 for darwin

Fixes: https://github.com/karelzak/util-linux/issues/1468
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agotests: (logger) check for socat
Karel Zak [Thu, 14 Oct 2021 08:46:45 +0000 (10:46 +0200)] 
tests: (logger) check for socat

Addresses: https://github.com/karelzak/util-linux/issues/1466
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agosu: reset RLIMIT_AS too
Karel Zak [Thu, 14 Oct 2021 08:28:59 +0000 (10:28 +0200)] 
su: reset RLIMIT_AS too

Fixes: https://github.com/karelzak/util-linux/issues/1465
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agodocs: add note about GitHub PR
Karel Zak [Thu, 14 Oct 2021 08:22:14 +0000 (10:22 +0200)] 
docs: add note about GitHub PR

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agofindmnt: (adoc) Added section stating exit code semantics
Mister Me [Thu, 7 Oct 2021 14:34:00 +0000 (08:34 -0600)] 
findmnt: (adoc) Added section stating exit code semantics

per issue #1464:

    https://github.com/karelzak/util-linux/issues/1464

[kzak@redhat.com: - move the text from DESCRIPTION to EXIT STATUS section]

Signed-off-by: Glenn Golden <gdg@zplane.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agomore: fix -e in non-interactive mode
Karel Zak [Tue, 5 Oct 2021 08:53:13 +0000 (10:53 +0200)] 
more: fix -e in non-interactive mode

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agosu: reset also RLIMIT_FSIZE and RLIMIT_NOFILE
Karel Zak [Mon, 4 Oct 2021 13:39:40 +0000 (15:39 +0200)] 
su: reset also RLIMIT_FSIZE and RLIMIT_NOFILE

Addresses: https://github.com/linux-pam/linux-pam/issues/85
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agomount.8.adoc: note that mandatory locking is fully deprecated in Linux 5.15
Jeff Layton [Fri, 1 Oct 2021 12:25:53 +0000 (08:25 -0400)] 
mount.8.adoc: note that mandatory locking is fully deprecated in Linux 5.15

Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
3 years agofstrim: fix typo
Karel Zak [Mon, 4 Oct 2021 09:14:01 +0000 (11:14 +0200)] 
fstrim: fix typo

Addresses: https://github.com/karelzak/util-linux/issues/1463
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agofstrim: don't trigger autofs
Karel Zak [Mon, 4 Oct 2021 09:14:01 +0000 (11:14 +0200)] 
fstrim: don't trigger autofs

- ignore read-only entries
- ignore autofs entries (for example from /proc/self/mountinfo)
- ignore autofs mountpoints where automounter has not been triggered yet

Fixes: https://github.com/karelzak/util-linux/issues/1463
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agosu: reset RLIMIT_{NICE,RTPRIO} to zero
Karel Zak [Fri, 1 Oct 2021 12:59:50 +0000 (14:59 +0200)] 
su: reset RLIMIT_{NICE,RTPRIO} to zero

Addresses: https://github.com/linux-pam/linux-pam/issues/85
Reported-by: Lennart Poettering <lennart@poettering.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agoprlimit: improve --help output
Karel Zak [Fri, 1 Oct 2021 12:47:04 +0000 (14:47 +0200)] 
prlimit: improve --help output

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agomore: POSIX compliance patch preventing exit on EOF without -e
Ian Jones [Wed, 29 Sep 2021 12:50:14 +0000 (14:50 +0200)] 
more: POSIX compliance patch preventing exit on EOF without -e

[kzak@redhat.com: - merge all patches to one commit,
                  - improve prompt for non-tty stdin]

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agofallocate: add verbose messages
Karel Zak [Mon, 27 Sep 2021 13:40:11 +0000 (15:40 +0200)] 
fallocate: add verbose messages

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2003927
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agohardlink: use more passive wording in hardlink.1
Eduard Bloch [Mon, 27 Sep 2021 07:08:12 +0000 (09:08 +0200)] 
hardlink: use more passive wording in hardlink.1

And fix "same (basename)".

Signed-off-by: Eduard Bloch <blade@debian.org>
3 years agoLet user choose larger buffers for IO reading
Eduard Bloch [Mon, 27 Sep 2021 07:07:23 +0000 (09:07 +0200)] 
Let user choose larger buffers for IO reading

Simultaneous reading of multiple files through a small one-page buffer
is slow with classic HDDs. Let the user improve it by chosing buffers of
several mebibytes if needed.

[kzak@redhat.com: - tiny changes to coding style
                  - mark buffers static
                  - use xalloc.h]

Signed-off-by: Eduard Bloch <blade@debian.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agosetterm: (man) improve dosc about optional arguments
Karel Zak [Mon, 27 Sep 2021 10:49:01 +0000 (12:49 +0200)] 
setterm: (man) improve dosc about optional arguments

Fixes: https://github.com/karelzak/util-linux/issues/1457
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agomeson: fix typo
Karel Zak [Fri, 24 Sep 2021 13:52:07 +0000 (15:52 +0200)] 
meson: fix typo

Addresses: https://github.com/karelzak/util-linux/issues/1442
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agomeson: make raw(7) optional
Karel Zak [Thu, 23 Sep 2021 12:09:35 +0000 (14:09 +0200)] 
meson: make raw(7) optional

Fixes: https://github.com/karelzak/util-linux/issues/1442
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agotest_mount_optstr: use xstrdup()
Karel Zak [Thu, 23 Sep 2021 11:11:16 +0000 (13:11 +0200)] 
test_mount_optstr: use xstrdup()

Fixes: https://github.com/karelzak/util-linux/issues/1434
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agolib/env: don't ignore failed malloc
Karel Zak [Thu, 23 Sep 2021 11:08:32 +0000 (13:08 +0200)] 
lib/env: don't ignore failed malloc

Fixes: https://github.com/karelzak/util-linux/issues/1434
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agomkswap: support -U {clear,random,time,uuid}
Karel Zak [Thu, 23 Sep 2021 09:53:26 +0000 (11:53 +0200)] 
mkswap: support -U {clear,random,time,uuid}

Let's follow -U from mkfs.ext4 and make it easy to fully control
UUIDs for the swap area.

Fixes: https://github.com/karelzak/util-linux/issues/1453
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agoMerge branch 'int/alex/hifive_uuid' of https://github.com/AlexGhiti/util-linux
Karel Zak [Thu, 23 Sep 2021 09:15:31 +0000 (11:15 +0200)] 
Merge branch 'int/alex/hifive_uuid' of https://github.com/AlexGhiti/util-linux

* 'int/alex/hifive_uuid' of https://github.com/AlexGhiti/util-linux:
  include: Rename HiFive partition UUIDs

3 years agoMerge branch 'master' of https://github.com/mariobl/util-linux
Karel Zak [Thu, 23 Sep 2021 09:12:10 +0000 (11:12 +0200)] 
Merge branch 'master' of https://github.com/mariobl/util-linux

* 'master' of https://github.com/mariobl/util-linux:
  Man pages: Fix end extend formatting

3 years agomount: add hint about dmesg(8) to error messages
Karel Zak [Thu, 23 Sep 2021 09:07:55 +0000 (11:07 +0200)] 
mount: add hint about dmesg(8) to error messages

Fixes: https://github.com/karelzak/util-linux/pull/1444
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agoinclude: Rename HiFive partition UUIDs
Alexandre Ghiti [Wed, 22 Sep 2021 04:38:14 +0000 (06:38 +0200)] 
include: Rename HiFive partition UUIDs

Both HiFive Unleashed and HiFive Unmatched bootloaders seek for the same
UUIDs to load the next stage bootloader: the current name makes partitions
on Unmatched board appear as 'Unleashed'.

Fix that by removing the 'Unleashed' part of the current naming so it
fits both.

Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com>
3 years agoMan pages: Fix end extend formatting
Mario Blättermann [Tue, 21 Sep 2021 18:48:11 +0000 (20:48 +0200)] 
Man pages: Fix end extend formatting

3 years agomount.8.adoc: fix misformatting
Mario Blättermann [Tue, 21 Sep 2021 08:48:37 +0000 (10:48 +0200)] 
mount.8.adoc: fix misformatting

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agounshare.1.adoc: Improve wording re creation of bind mounts
Michael Kerrisk [Thu, 9 Sep 2021 00:08:28 +0000 (02:08 +0200)] 
unshare.1.adoc: Improve wording re creation of bind mounts

Use consistent wording for the options that create
bind mounts, and improve the wording.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agounshare.1.adoc: Improve wording re namespace creation
Michael Kerrisk [Thu, 9 Sep 2021 00:08:27 +0000 (02:08 +0200)] 
unshare.1.adoc: Improve wording re namespace creation

The terminonoly "unshare the namespace" is not very helpful.
Instead, use wording that explains what these options actually
fo: "create a new namespace".

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
3 years agogithub: add meson build target
Karel Zak [Thu, 16 Sep 2021 11:25:07 +0000 (13:25 +0200)] 
github: add meson build target

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agoMerge branch 'meson-fixes' of https://github.com/Hello71/util-linux
Karel Zak [Thu, 16 Sep 2021 11:07:05 +0000 (13:07 +0200)] 
Merge branch 'meson-fixes' of https://github.com/Hello71/util-linux

* 'meson-fixes' of https://github.com/Hello71/util-linux:
  meson: make asciidoc optional
  meson: fix building libsmartcols
  meson: fix building logger

3 years agodmesg: translate ctime strings
Karel Zak [Thu, 16 Sep 2021 10:50:01 +0000 (12:50 +0200)] 
dmesg: translate ctime strings

Let's make the date-time strings accessible for translators.

Fixes: https://github.com/karelzak/util-linux/issues/1451
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agologger: fix --prio-prefix doesn't use --priority default
Karel Zak [Thu, 16 Sep 2021 10:20:25 +0000 (12:20 +0200)] 
logger: fix --prio-prefix doesn't use --priority default

The commit b9ef27f have added priority check, but it introduced
regression as the default priority (as specified by --priority) is
ignored.

This patch fixes this problem, but it also removes extra check for
"kern facility", it's unnecessary and inconsistent with the rest of
logger.

Fixes: https://github.com/karelzak/util-linux/issues/1450
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agologger: dealloc login name
Karel Zak [Thu, 16 Sep 2021 10:15:56 +0000 (12:15 +0200)] 
logger: dealloc login name

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agoMerge branch 'losetup-direct-dio' of https://github.com/Hello71/util-linux
Karel Zak [Thu, 16 Sep 2021 09:32:57 +0000 (11:32 +0200)] 
Merge branch 'losetup-direct-dio' of https://github.com/Hello71/util-linux

* 'losetup-direct-dio' of https://github.com/Hello71/util-linux:
  losetup: directly set dio instead of afterwards

3 years agoMerge branch 'more-shell-execution' of https://github.com/ritikrajdev/util-linux
Karel Zak [Thu, 16 Sep 2021 09:00:33 +0000 (11:00 +0200)] 
Merge branch 'more-shell-execution' of https://github.com/ritikrajdev/util-linux

* 'more-shell-execution' of https://github.com/ritikrajdev/util-linux:
  more - Bug Resolve - new line separated command execution

3 years agoMerge branch 'refactor-tests' of https://github.com/Ajchler/util-linux
Karel Zak [Thu, 16 Sep 2021 08:51:27 +0000 (10:51 +0200)] 
Merge branch 'refactor-tests' of https://github.com/Ajchler/util-linux

* 'refactor-tests' of https://github.com/Ajchler/util-linux:
  tests: use subtests
  tests: make use of subtests

3 years agomore - Bug Resolve - new line separated command execution
ritikrajdev [Mon, 13 Sep 2021 22:57:14 +0000 (04:27 +0530)] 
more - Bug Resolve - new line separated command execution

3 years agotests: use subtests
Vojtěch Eichler [Mon, 13 Sep 2021 08:59:59 +0000 (10:59 +0200)] 
tests: use subtests

3 years agolosetup: directly set dio instead of afterwards
Alex Xu (Hello71) [Thu, 9 Sep 2021 13:55:03 +0000 (09:55 -0400)] 
losetup: directly set dio instead of afterwards

This avoids an extra syscall, and allows the kernel to automatically set
block size [0], avoiding unnecessary failure with 4096-byte devices.

This changes the observable behavior of losetup --direct-io in the case
where DIO is not supported to fully fail, instead of creating a
non-direct-io device. If the user explicitly specifies --direct-io, then
they should get either a DIO loopdev or no loopdev, not a non-DIO
loopdev and a misleading error.

Additionally, loopcxt_setup_device now uses O_CLOEXEC in the read-only
fallback.

[0] https://github.com/torvalds/linux/commit/85560117d00f5d528e928918b8f61cadcefff98b

3 years agotests: make use of subtests
Vojtěch Eichler [Wed, 8 Sep 2021 10:36:19 +0000 (12:36 +0200)] 
tests: make use of subtests

3 years agomeson: make asciidoc optional
Alex Xu (Hello71) [Tue, 7 Sep 2021 22:58:48 +0000 (18:58 -0400)] 
meson: make asciidoc optional

it should be under an option like autoconf, but cba to do that now, and
this is an improvement over the status quo.

3 years agomeson: fix building libsmartcols
Alex Xu (Hello71) [Tue, 7 Sep 2021 22:58:32 +0000 (18:58 -0400)] 
meson: fix building libsmartcols

3 years agomeson: fix building logger
Alex Xu (Hello71) [Tue, 7 Sep 2021 22:58:16 +0000 (18:58 -0400)] 
meson: fix building logger

3 years agoMerge branch 'master' of https://github.com/yugart/util-linux
Karel Zak [Tue, 7 Sep 2021 10:30:15 +0000 (12:30 +0200)] 
Merge branch 'master' of https://github.com/yugart/util-linux

* 'master' of https://github.com/yugart/util-linux:
  Fix memory leaks in the chcpu

3 years agoeject: fix typo in docs
Karel Zak [Tue, 7 Sep 2021 10:27:54 +0000 (12:27 +0200)] 
eject: fix typo in docs

Fixes: https://github.com/karelzak/util-linux/issues/1436
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agoFix memory leaks in the chcpu
jiazhenyuan [Mon, 6 Sep 2021 08:50:27 +0000 (16:50 +0800)] 
Fix memory leaks in the chcpu

3 years agoFix misspellings
Rafael Fontenelle [Sat, 4 Sep 2021 14:11:04 +0000 (11:11 -0300)] 
Fix misspellings

3 years agotests: Skip lsns/ioctl_ns test if unshare fails
Chris Hofstaedtler [Fri, 20 Aug 2021 10:30:50 +0000 (10:30 +0000)] 
tests: Skip lsns/ioctl_ns test if unshare fails

Some parts of the Debian build infrastructure uses unshare to run the
package build, and that appears to cause a "nested" unshare in the
lsns/ioctl_ns test to fail. Unfortunately the tests then hang at this
point.

Try running unshare before the actual test, and skip the test if unshare
already fails.

[kzak@redhat.com: - add --fork to the test
                  - don't write to stdout/err]

Signed-off-by: Chris Hofstaedtler <zeha@debian.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agosu: (bash-completion) offer usernames rather than files
Karel Zak [Tue, 31 Aug 2021 10:51:40 +0000 (12:51 +0200)] 
su: (bash-completion) offer usernames rather than files

Fixes: https://github.com/karelzak/util-linux/issues/1424
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agocolumn: segmentation fault on invalid unicode input passed to -s option
Karel Zak [Tue, 31 Aug 2021 10:31:15 +0000 (12:31 +0200)] 
column: segmentation fault on invalid unicode input passed to -s option

The function mbs_to_wcs() returns NULL on invalid UTF.

Fixes: https://github.com/karelzak/util-linux/issues/1425
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agoMerge branch 'bug/1416' of https://github.com/V-Smeets/util-linux
Karel Zak [Tue, 31 Aug 2021 10:26:00 +0000 (12:26 +0200)] 
Merge branch 'bug/1416' of https://github.com/V-Smeets/util-linux

* 'bug/1416' of https://github.com/V-Smeets/util-linux:
  Erase line before writing the filename

3 years agoMerge branch 'patch-2' of https://github.com/rffontenelle/util-linux
Karel Zak [Tue, 31 Aug 2021 10:08:38 +0000 (12:08 +0200)] 
Merge branch 'patch-2' of https://github.com/rffontenelle/util-linux

* 'patch-2' of https://github.com/rffontenelle/util-linux:
  asciidoc: unconstrained formatting pair in fdisk

3 years agoMerge branch 'patch-1' of https://github.com/rffontenelle/util-linux
Karel Zak [Tue, 31 Aug 2021 10:07:34 +0000 (12:07 +0200)] 
Merge branch 'patch-1' of https://github.com/rffontenelle/util-linux

* 'patch-1' of https://github.com/rffontenelle/util-linux:
  asciidoc: fix quoted message in fsck.minix

3 years agotests: use sub-tests for dm-verity
Karel Zak [Tue, 31 Aug 2021 09:57:30 +0000 (11:57 +0200)] 
tests: use sub-tests for dm-verity

* write error to the test log file rather than on stdout
* use sub-tests to get more info on output
* don't use ts_die in sub-tests to make sure we call final dmsetup remove

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agotests: check for dm-verity support
Karel Zak [Tue, 31 Aug 2021 09:40:45 +0000 (11:40 +0200)] 
tests: check for dm-verity support

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agotests: add tests for dm-verity support in mount
Vojtěch Eichler [Fri, 27 Aug 2021 08:48:27 +0000 (10:48 +0200)] 
tests: add tests for dm-verity support in mount

3 years agodocs: add hint about TP
Karel Zak [Tue, 31 Aug 2021 09:02:26 +0000 (11:02 +0200)] 
docs: add hint about TP

Addresses: https://github.com/karelzak/util-linux/issues/1421
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agolsblk: add zoned columns to "lsblk -z"
Naohiro Aota [Mon, 30 Aug 2021 05:52:57 +0000 (14:52 +0900)] 
lsblk: add zoned columns to "lsblk -z"

Add zoned columns to the "-z" option as follow.

$ lsblk -z -i
NAME        ZONED        ZONE-SZ ZONE-NR ZONE-AMAX ZONE-OMAX ZONE-APP ZONE-WGRAN
sda         host-managed    256M   55880         0       128     672K         4K
sdb         host-managed    256M   55880         0       128     672K         4K
zram0       none              0B       0         0         0       0B         0B
nvme2n1     none              0B       0         0         0       0B         0B
|-nvme2n1p1 none              0B       0         0         0       0B         0B
|-nvme2n1p2 none              0B       0         0         0       0B         0B
`-nvme2n1p3 none              0B       0         0         0       0B         0B
nvme0n1     none              0B       0         0         0       0B         0B
nvme1n1     none              0B       0         0         0       0B         0B
nvme0n2     host-managed      2G    1844        14        14       4M         4K
nvme1n2     host-managed      2G    1844        14        14       4M         4K

Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
3 years agolsblk: add columns of zoned parameters
Naohiro Aota [Mon, 30 Aug 2021 05:52:56 +0000 (14:52 +0900)] 
lsblk: add columns of zoned parameters

Several parameters for zoned devices are missing from lsblk's columns. This
commit introduces them as following.

 ZONE-SZ     zone size
 ZONE-WGRAN  zone write granularity
 ZONE-APP    zone append max bytes
 ZONE-NR     number of zones
 ZONE-OMAX   maximum number of open zones
 ZONE-AMAX   maximum number of active zones

Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
3 years agolsblk: factor out function to read sysfs param as bytes
Naohiro Aota [Mon, 30 Aug 2021 05:52:55 +0000 (14:52 +0900)] 
lsblk: factor out function to read sysfs param as bytes

Factor out a new function device_read_bytes() to read a sysfs path as bytes
for a preparation for the next commit and to reduce the code duplication.

Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
3 years agoasciidoc: unconstrained formatting pair in fdisk
Rafael Fontenelle [Mon, 30 Aug 2021 10:19:06 +0000 (07:19 -0300)] 
asciidoc: unconstrained formatting pair in fdisk

Not using unconstrained witl result in showing asterisk instead, which is unwanted.

3 years agoasciidoc: fix quoted message in fsck.minix
Rafael Fontenelle [Sun, 29 Aug 2021 20:10:05 +0000 (17:10 -0300)] 
asciidoc: fix quoted message in fsck.minix

3 years agoAdd partition type GUID for Haiku.
Hill Ma [Tue, 24 Aug 2021 21:21:27 +0000 (14:21 -0700)] 
Add partition type GUID for Haiku.

3 years agotests: make eject umount tests more robust
Karel Zak [Tue, 24 Aug 2021 08:49:32 +0000 (10:49 +0200)] 
tests: make eject umount tests more robust

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agotests: make mount/fstab-all more robust
Karel Zak [Mon, 23 Aug 2021 14:28:52 +0000 (16:28 +0200)] 
tests: make mount/fstab-all more robust

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agotests: make ./run.sh more robust
Karel Zak [Mon, 23 Aug 2021 13:15:38 +0000 (15:15 +0200)] 
tests: make ./run.sh more robust

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agoErase line before writing the filename
Vincent Smeets [Fri, 20 Aug 2021 09:00:33 +0000 (11:00 +0200)] 
Erase line before writing the filename

3 years agosfdisk: write empty label also when only ignored partition specified
Karel Zak [Thu, 19 Aug 2021 10:10:02 +0000 (12:10 +0200)] 
sfdisk: write empty label also when only ignored partition specified

sfdisk writes empty disk label only when "label:" header specified.
Unfortunately, this feature is ignored when all specified partitions
are ignored

  echo -e "label: dos\n0,0,0\n" | sfdisk /dev/sdc

Fixes: https://github.com/karelzak/util-linux/issues/1413
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agoMerge branch 'rfkill-event-abort' of https://github.com/lightmare/util-linux
Karel Zak [Thu, 19 Aug 2021 09:12:31 +0000 (11:12 +0200)] 
Merge branch 'rfkill-event-abort' of https://github.com/lightmare/util-linux

* 'rfkill-event-abort' of https://github.com/lightmare/util-linux:
  rfkill: quit when read end of stdout is closed

3 years agogithub: add linux-modules-extra package to CI tests
Karel Zak [Thu, 19 Aug 2021 09:01:19 +0000 (11:01 +0200)] 
github: add linux-modules-extra package to CI tests

It should be enough to get scsi_debug kernel module.

Suggested-by: Milan Broz <gmazyland@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agorfkill: quit when read end of stdout is closed
Mickey Rose [Tue, 17 Aug 2021 14:36:06 +0000 (16:36 +0200)] 
rfkill: quit when read end of stdout is closed

3 years agowdctl: Workaround reported boot-status bits not being present in wd->ident.options
Hans de Goede [Fri, 30 Jul 2021 11:22:54 +0000 (13:22 +0200)] 
wdctl: Workaround reported boot-status bits not being present in wd->ident.options

Some watchdog drivers are capable of reporting WDIOF_CARDRESET in their
bootstatus, but they do not advertise this in the options field
returned by the WDIOC_GETSUPPORT ioctl.

This causes wdctl to not print the CARDRESET flag on these devices,
even when the reset was caused by the watchdog and this is being
reported in the WDIOC_GETBOOTSTATUS return.

Add a workaround by or-ing any bits which are set in the status and
bstatus returns into wd->ident.options so that reported flags will
get printend independent of them being advertised as supported in
wd->ident.options.

This will make wdctl print a CARDRESET line when the system was
actually reset by the watchdog while omitting it when it was not
reset by the watchdog.  At least on drivers which have the
CARDRESET is missing from info.options problem.  On other drivers
the CARDRESET line will always be printend, but the actual reported
value will change.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
3 years agolibfdisk: check calloc() return [gcc-analyzer]
Karel Zak [Wed, 18 Aug 2021 09:35:07 +0000 (11:35 +0200)] 
libfdisk: check calloc() return [gcc-analyzer]

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agolibfdisk: make self_partition() use more robust [gcc-analyzer]
Karel Zak [Wed, 18 Aug 2021 09:28:43 +0000 (11:28 +0200)] 
libfdisk: make self_partition() use more robust [gcc-analyzer]

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agolibfdisk: dereference of possibly-NULL [gcc-analyzer]
Karel Zak [Wed, 18 Aug 2021 09:15:55 +0000 (11:15 +0200)] 
libfdisk: dereference of possibly-NULL [gcc-analyzer]

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agolibmount: make mnt_table_get_fs_root() more robust [gcc-analyzer]
Karel Zak [Wed, 18 Aug 2021 09:02:45 +0000 (11:02 +0200)] 
libmount: make mnt_table_get_fs_root() more robust [gcc-analyzer]

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agoipcmk: fix strtoul use, remove deadcode [coverity scan]
Karel Zak [Wed, 18 Aug 2021 08:38:52 +0000 (10:38 +0200)] 
ipcmk: fix strtoul use, remove deadcode [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agohardlink: Calling posix_fadvise without checking return value [coverity scan]
Karel Zak [Wed, 18 Aug 2021 08:26:48 +0000 (10:26 +0200)] 
hardlink: Calling posix_fadvise without checking return value [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agomore: Calling open without checking return value [coverity scan]
Karel Zak [Wed, 18 Aug 2021 08:25:14 +0000 (10:25 +0200)] 
more: Calling open without checking return value [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agolscpu: fix cppcheck warning [Uninitialized variable]
Karel Zak [Wed, 18 Aug 2021 08:19:23 +0000 (10:19 +0200)] 
lscpu: fix cppcheck warning [Uninitialized variable]

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agomount: (adoc) ext_N_ → ext__N__ [manpage-l10n]
Karel Zak [Tue, 17 Aug 2021 13:28:28 +0000 (15:28 +0200)] 
mount: (adoc) ext_N_ → ext__N__ [manpage-l10n]

Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agomount: (adoc) mount → mount(2), of → or [manpage-l10n]
Karel Zak [Tue, 17 Aug 2021 13:22:09 +0000 (15:22 +0200)] 
mount: (adoc) mount → mount(2),  of → or [manpage-l10n]

Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agomount: (adoc) fix missing period [manpage-l10n]
Karel Zak [Tue, 17 Aug 2021 13:07:59 +0000 (15:07 +0200)] 
mount: (adoc) fix missing period [manpage-l10n]

Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agoMerge branch 'master' of https://github.com/panchenbo/util-linux
Karel Zak [Tue, 17 Aug 2021 11:55:02 +0000 (13:55 +0200)] 
Merge branch 'master' of https://github.com/panchenbo/util-linux

3 years agoagetty: (adoc) double hyphen replaced by dash in man pages
Karel Zak [Tue, 17 Aug 2021 11:50:52 +0000 (13:50 +0200)] 
agetty: (adoc) double hyphen replaced by dash in man pages

Fixes: https://github.com/karelzak/util-linux/issues/1411
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agozramctl: improve usage() output
Karel Zak [Tue, 17 Aug 2021 11:32:10 +0000 (13:32 +0200)] 
zramctl: improve usage() output

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agofix error ft_part 0x662
panchenbo [Tue, 17 Aug 2021 03:29:12 +0000 (11:29 +0800)] 
fix error ft_part 0x662

3 years agozramctl: add zstd compression algorithm option
Jan Samek [Mon, 16 Aug 2021 19:22:15 +0000 (21:22 +0200)] 
zramctl: add zstd compression algorithm option

Add information about the possible value 'zstd' for the 'zramctl --algorithm'
option to 'zramctl --help' and zramctl (8) manpage. The kernel supports zram
with zstd compression starting with 4.15 (see
https://lore.kernel.org/lkml/20170912050005.3247-1-sergey.senozhatsky@gmail.com/#r).

Signed-off-by: Jan Samek <samekh@email.cz>
3 years agomount: add -m,--mkdir as shortcut for X-mount.mkdir
Karel Zak [Thu, 12 Aug 2021 11:51:57 +0000 (13:51 +0200)] 
mount: add -m,--mkdir as shortcut for X-mount.mkdir

Suggested-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agolibmount: support quotes in X-mount options
Karel Zak [Thu, 12 Aug 2021 11:44:19 +0000 (13:44 +0200)] 
libmount: support quotes in X-mount options

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agolibmount: show options string on parse error
Karel Zak [Thu, 12 Aug 2021 11:41:56 +0000 (13:41 +0200)] 
libmount: show options string on parse error

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agolibmount: allow X-* options more than once
Karel Zak [Thu, 12 Aug 2021 11:39:39 +0000 (13:39 +0200)] 
libmount: allow X-* options more than once

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agolibmount: change propagation of /run for X-mount.subdir
Karel Zak [Thu, 12 Aug 2021 10:12:39 +0000 (12:12 +0200)] 
libmount: change propagation of /run for X-mount.subdir

We do not need to create a new mount node from /run/mount/tmptgt
(where we mount filesystem root), because /run is already mount
node in all mainstream distros, and we can use MS_PRIVATE for
this top-level directory. There is still fallback if /run is
on root filesystem.

This solution reduces number of mount operations, with the patch the
subdir implementation is:

 * open current namespace from /proc/self/ns/mnt
 * mkdir /run/mount/tmptg (if it does not exist)
 * make /run private by mount(MS_PRIVATE)
 * mount filesystem to /run/mount/tmptg
 * bind mount /run/mount/tmptg/<subdir> to <target>
 * umount /run/mount/tmptg
 * setns() to the original namespace

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agolibmount: use /run/mount/tmptgt rather than /tmp/mount/mount.<pid>
Karel Zak [Thu, 12 Aug 2021 08:58:18 +0000 (10:58 +0200)] 
libmount: use /run/mount/tmptgt rather than /tmp/mount/mount.<pid>

The unshared namespace is per-process, so we can use the same
directory in all mount(8) instances. It's unnecessary to create
and remove process specific directory.

Signed-off-by: Karel Zak <kzak@redhat.com>
3 years agolibmount: remove support for obsolete /dev/.mount/utab
Karel Zak [Thu, 12 Aug 2021 08:44:03 +0000 (10:44 +0200)] 
libmount: remove support for obsolete /dev/.mount/utab

The default is /run/mount/utab for years.

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