Karel Zak [Mon, 8 Sep 2025 10:03:32 +0000 (12:03 +0200)]
Merge branch 'master' of https://github.com/mariobl/util-linux
* 'master' of https://github.com/mariobl/util-linux:
Fix another issue in login.1.adoc
sfdisk.8.adoc: Replace --help and --version with external entity
Fix markup in pam_lastlog2.8.adoc
Fix markup in column.1.adoc
Fix markup in mount.8.adoc
Fix typo and markup in getopt.1.adoc
Fix markup in lsfd.1.adoc
Fix markup, grammar and spelling in scols-filter.5.adoc
Fix login.1.adoc
Karel Zak [Mon, 8 Sep 2025 09:44:16 +0000 (11:44 +0200)]
libfdisk: improve collision reporting
In some cases, a collision occurs in the first sector. Creating a new
partition table overwrites this sector, but updating an existing table
does not. In the latter case, promising to wipe the collision is a
bug.
Because we cannot know whether the collision is expected (e.g., hybrid
or boot disks) or unintended, we inform the user and let them decide.
libfdisk can wipe the unwanted signature only when creating a new
partition table; otherwise, the user can use wipefs.
This commit introduces fdisk_is_collision_area(), an API to detect
where the collision occurs. The function is generic and not limited to
the first sector.
Fixes: https://github.com/util-linux/util-linux/issues/3659 Signed-off-by: Karel Zak <kzak@redhat.com>
sfdisk.8.adoc: Replace --help and --version with external entity
sfdisk.8.adoc still had the literal --help and --version options, in contrary to all other .adoc files, which have the man-common/help-version.adoc entity.
Karel Zak [Wed, 3 Sep 2025 08:54:06 +0000 (10:54 +0200)]
libfdisk: (script) fix device name separator parsing
In the named-fields script format, the colon is used as the separator
between the device name and other values. The device name may also
contain colons. This commit ensures it is treated as a separator only
when there is a space before or after the colon.
Note that the device name is optional and may be omitted. There is no
escaping for problematic characters in the name. Use " : " as the
separator.
Fixes: https://github.com/util-linux/util-linux/issues/3723 Signed-off-by: Karel Zak <kzak@redhat.com>
Karel Zak [Wed, 3 Sep 2025 08:06:39 +0000 (10:06 +0200)]
Merge branch 'feat/allow_killing_with_pidfd' of https://github.com/cgoesche/util-linux-fork
* 'feat/allow_killing_with_pidfd' of https://github.com/cgoesche/util-linux-fork:
textual: rename list_colunms() to list_columns() and remove trailing whitespaces
include/strutils: add missing header guard comment
lib: fix bad indentation in meson.build
kill: add support for race-free process kills using pidfd inodes
Karel Zak [Wed, 3 Sep 2025 07:52:07 +0000 (09:52 +0200)]
Merge branch 'feat/lslocks_output_env' of https://github.com/cgoesche/util-linux-fork
* 'feat/lslocks_output_env' of https://github.com/cgoesche/util-linux-fork:
lslocks: (man) add LSLOCKS_COLUMNS description in new ENVIRONMENT section
lslocks: add support for LSLOCKS_COLUMNS environmental variable
Karel Zak [Wed, 3 Sep 2025 07:47:04 +0000 (09:47 +0200)]
Merge branch 'PR/libmount-canonicalize-cleanup' of https://github.com/karelzak/util-linux-work
* 'PR/libmount-canonicalize-cleanup' of https://github.com/karelzak/util-linux-work:
lib/canonicalize: use ul_ prefix
lib/canonicalize: introduce generic drop-permission caller
meson: cleanup tests to use libcommon.la
autotools: cleanup tests to use libcommon.la
tests: add canonicalize test
lib/canonicalize: refactor canonicalize_path()
lib/canonicalize: rename to ul_absolute_path()
kill: add support for race-free process kills using pidfd inodes
The 6.9 Linux kernel added support for pidfds which introduces inodes
that stay unique for the system lifetime and can be used to reference
a process with both its traditional pid and pid fd inode number.
This enables race-free killing of processes and protects from false
referencing due to pid rollovers.
This patch adds a new way of addressing processes with the format
'pid:pidfd_inode'. When the new format is used, 'kill' assumes the user wishes
to use a pidfd to signal a process, and will therefore use pidfd_* routines
to complete the task if the provided inode matches the one from a previously
acquired pidfd.
Addresses: #3252 Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
This patch makes it so that we continue parsing all CLI options even
when we find -H/--list-columns. Therefore we don't miss any format
specifying options, namely --json and --raw, and print the columns
in the desired form.
Closes: #3725 Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
Karel Zak [Mon, 1 Sep 2025 10:31:47 +0000 (12:31 +0200)]
Merge branch 'master' of https://github.com/mariobl/util-linux
* 'master' of https://github.com/mariobl/util-linux:
Fix markup in pam_lastlog2.8.adoc
Fix markup in ll2_import_lastlog.3.adoc
Fix markup in more.1.adoc
Fix markup in column.1.adoc
Fix markup in mesg.1.adoc
Fix markup in unshare.1.adoc
Fix markup in swapon.8.adoc
Fix typos and markup in setpriv.1.adoc
Fix markup in lsirq.1.adoc
Fix markup in flock.1.adoc
Fix markup in chmem.8.adoc
Fix markup in lastlog2.8.adoc
Fix markup in findmnt.8.adoc
Fix markup in su.1.adoc
Fix markup in login.1.adoc
Fix markup in scols-filter.5.adoc
Karel Zak [Mon, 1 Sep 2025 09:00:19 +0000 (11:00 +0200)]
Merge branch 'fix/findmnt_output_regression' of https://github.com/cgoesche/util-linux-fork
* 'fix/findmnt_output_regression' of https://github.com/cgoesche/util-linux-fork:
findmnt: add missing newline in --raw, --pair and --list output formats
Masatake YAMATO [Sat, 30 Aug 2025 18:18:32 +0000 (03:18 +0900)]
lsfd: revise the code disabling hyperlinks
In the original code, the code was at file.c. This change lifts up
the code to upper layer. As a result the fill_column method of struct
file becomes simple.
As a side effect. this change disables hyperlinks for the entries of
UNKN type (e.g. eventpool, or pidfd). This is a bug fix.
Jiang XueQian [Sat, 30 Aug 2025 09:02:59 +0000 (17:02 +0800)]
zramctl: ignore ENOENT when setting max_comp_streams
The `max_comp_streams` attribute of zram devices has been deprecated and
all writes were silently ignored by the kernel since 2016. It was
finally removed in 6.15, causing zramctl to fail on ENOENT, when it
should just ignore the error.
Chester Gregg [Thu, 28 Aug 2025 02:22:30 +0000 (02:22 +0000)]
Add reflink support for ZFS.
OpenZFS has added the block cloning feature, which implements reflinks for its copy-on-write filesystem. It is now stable and enabled by default on OpenZFS 2.3.0.
This feature addition will add the '-U' and '--unknown' options
It'll allow getopt to ignore unknown options and leave them untouched.
Additionally, it will surpress any error messages generated by getopt(3).
Addresses: #701 Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
Karel Zak [Tue, 26 Aug 2025 09:25:18 +0000 (11:25 +0200)]
Merge branch 'fix/clarify_long_flag_in_getopt_script_examples' of https://github.com/cgoesche/util-linux-fork
* 'fix/clarify_long_flag_in_getopt_script_examples' of https://github.com/cgoesche/util-linux-fork:
getopt: clarify the use of '--long' instead of '--longoptions' in shell examples
Karel Zak [Tue, 26 Aug 2025 09:22:41 +0000 (11:22 +0200)]
Merge branch 'feat/support_lsblk_columns_env' of https://github.com/cgoesche/util-linux-fork
* 'feat/support_lsblk_columns_env' of https://github.com/cgoesche/util-linux-fork:
lsblk: add support for LSBLK_COLUMNS environmental variable as an alternative to --output
Karel Zak [Tue, 26 Aug 2025 09:20:16 +0000 (11:20 +0200)]
Merge branch 'fix/document_special_chars_in_getopt' of https://github.com/cgoesche/util-linux-fork
* 'fix/document_special_chars_in_getopt' of https://github.com/cgoesche/util-linux-fork:
getopt: document special symbols that should not be used as option characters
Karel Zak [Tue, 26 Aug 2025 09:16:41 +0000 (11:16 +0200)]
Merge branch 'PR/mount-api-includes' of https://github.com/karelzak/util-linux-work
* 'PR/mount-api-includes' of https://github.com/karelzak/util-linux-work:
include/mount-api-utils: update to recent kernel
include/mount-api-utils: avoid using sys/mount.h
Sumanth Korikkar [Fri, 22 Aug 2025 15:13:53 +0000 (17:13 +0200)]
chmem: Remove commit - chmem print warnings about failures always
Users do not care which blocks are set offline, when using size option
Consistently printing warnings/errors in this case may confuse them and
create the false impression that the enable/disable operation itself has
failed.
If size option succeeds, chmem should not print errors/warnings.
Hence, revert commit 48675a744 ("chmem: print warnings about failures always (not only with --verbose)")