]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
17 hours agoblkid: correct an erroneous error message stable/v2.41
Benno Schulenberg [Tue, 16 Sep 2025 13:44:41 +0000 (15:44 +0200)] 
blkid: correct an erroneous error message

Running `blkid -p -n no /dev/sda2` would report:

  blkid: error: -u <list> argument is empty

(Mentioning -u instead of -n, and falsely claiming emptiness.)

Now the above command will report:

  blkid: invalid argument: no

(I don't think option -n needs to be mentioned, as it will be obvious
when inspecting the command line.  Not mentioning the option allows
reusing an existing error message, avoiding needless ballooning and
allowing the patch to be applied to the stable branch.)

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
(cherry picked from commit 6bbf884525cad2702b1e69a0ac022db3ef92154d)

2 days agofindmnt: (usage) add a needed equals sign before an optional argument
Benno Schulenberg [Thu, 11 Sep 2025 13:48:07 +0000 (15:48 +0200)] 
findmnt: (usage) add a needed equals sign before an optional argument

The argument of --kernel is optional, so an '=' is required when an
argument is specified.

Also tweak the wording, and add a semicolon between two phrases.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
(cherry picked from commit 41c1dc60903803c2a4d7f286012f8e96ff06990f)

6 days agobuild-sys: update release dates v2.41.2-rc1
Karel Zak [Thu, 11 Sep 2025 09:06:44 +0000 (11:06 +0200)] 
build-sys: update release dates

Signed-off-by: Karel Zak <kzak@redhat.com>
6 days agodocs: add v2.41.2-ReleaseNotes
Karel Zak [Thu, 11 Sep 2025 09:04:00 +0000 (11:04 +0200)] 
docs: add v2.41.2-ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
6 days agopo-man: merge changes
Karel Zak [Thu, 11 Sep 2025 08:55:40 +0000 (10:55 +0200)] 
po-man: merge changes

6 days agopo-man: update es.po (from translationproject.org)
Antonio Ceballos Roa [Thu, 11 Sep 2025 08:55:31 +0000 (10:55 +0200)] 
po-man: update es.po (from translationproject.org)

6 days agolibmount: don't report fsconfig errors with "nofail"
Karel Zak [Thu, 11 Sep 2025 07:35:58 +0000 (09:35 +0200)] 
libmount: don't report fsconfig errors with "nofail"

The new kernel API returns EINVAL on FSCONFIG_CMD_CREATE if the mount
source is inaccessible. We do not want to report this as an error when
the "nofail" mount option is specified.

Note that EINVAL may also be returned by other fsconfig() settings, so
we need to check whether a source is specified and whether it is really
inaccessible. This is just a heuristic (as with the old mount(2)).

Fixes: https://github.com/util-linux/util-linux/issues/3741
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 8a7bc1ab00d91e8a17ca8cb2907ca3c2a73381dd)

6 days agolscpu: New Arm C1 parts
Jeremy Linton [Wed, 10 Sep 2025 14:51:21 +0000 (09:51 -0500)] 
lscpu: New Arm C1 parts

Arm has announced the C1-Nano with a TRM here:
https://developer.arm.com/documentation/107753/latest

The C1-Pro with a TRM here:
https://developer.arm.com/documentation/107771/latest

The C1-Ultra with a TRM here:
https://developer.arm.com/documentation/108014/latest

The C1-Premium with a TRM here:
https://developer.arm.com/documentation/109416/latest

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
(cherry picked from commit 50caf83d43fbee58ecb5a11e57857a027dea5148)

6 days agologger: fix buffer overflow when read stdin
Karel Zak [Wed, 10 Sep 2025 08:31:23 +0000 (10:31 +0200)] 
logger: fix buffer overflow when read stdin

$ perl -e 'print "<" . "0"x10240' | logger --prio-prefix
Segmentation fault (core dumped)

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit f9cdc91be0442b887e4a636fbb75f027f0267a84)

8 days agorev: add --zero option to --help output
Christian Goeschel Ndjomouo [Mon, 8 Sep 2025 19:48:01 +0000 (15:48 -0400)] 
rev: add --zero option to --help output

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
(cherry picked from commit d77118f46070f71eaafa3be1c7d24226ddcc2846)

8 days agolscpu: Add NVIDIA Olympus arm64 core
Matthew R. Ochs [Tue, 2 Sep 2025 20:28:36 +0000 (13:28 -0700)] 
lscpu: Add NVIDIA Olympus arm64 core

Add an entry for NVIDIA Olympus arm64 core.

Signed-off-by: Matthew R. Ochs <mochs@nvidia.com>
(cherry picked from commit 908777470d403ec30c525472ba0d3701c9c5a223)

8 days agohardlink: (man) add note note about ULFILEEQ_DEBUG=
Karel Zak [Wed, 3 Sep 2025 09:57:06 +0000 (11:57 +0200)] 
hardlink: (man) add note note about ULFILEEQ_DEBUG=

Addresses: https://github.com/util-linux/util-linux/discussions/3323
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit d073aab9d34eea205545c77222947691f4abf5aa)

8 days agolibfdisk: (script) improve separator usage in named-fields dump
Karel Zak [Wed, 3 Sep 2025 09:30:57 +0000 (11:30 +0200)] 
libfdisk: (script) improve separator usage in named-fields dump

Ensure that name=value pairs are separated by commas.

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit c5e6712f29c18659f8bd9a567dc7f849a2a3cf3b)

8 days agolibfdisk: (script) fix device name separator parsing
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>
(cherry picked from commit 4eab9175dfd62c1d1a0bbc43a49ca8a85e9adac7)

8 days agozramctl: ignore ENOENT when setting max_comp_streams
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.

Signed-off-by: Jiang XueQian <jiangxueqian@gmail.com>
(cherry picked from commit e4514111ebb6df5f22a0769a9dfb2338b9c6c81a)

8 days agofindmnt: add missing newline in --raw, --pair and --list output formats
Christian Goeschel Ndjomouo [Sat, 30 Aug 2025 02:41:04 +0000 (22:41 -0400)] 
findmnt: add missing newline in --raw, --pair and --list output formats

Addresses: #3711
Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
(cherry picked from commit 5dfb06873eb07389cc2aa9276adb7791bb5f40ab)

8 days agoman: Fixed incorrect ipcrm options
Prasanna Paithankar [Fri, 29 Aug 2025 12:43:17 +0000 (18:13 +0530)] 
man: Fixed incorrect ipcrm options

Signed-off-by: Prasanna Paithankar <paithankarprasanna@gmail.com>
(cherry picked from commit 40d088c63ce7742180e7d7e813dcababd4c478f5)

8 days agosfdisk: reject spurious arguments for --reorder/--backup-pt-sectors
Thomas Weißschuh [Sun, 24 Aug 2025 09:45:45 +0000 (11:45 +0200)] 
sfdisk: reject spurious arguments for --reorder/--backup-pt-sectors

These commands only accept a single device argument.
Reject any additional unexpected arguments.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
(cherry picked from commit 3c98bdcc1f9b13de8a9d54d034efea789978c1f9)

8 days agogetopt: document special symbols that should not be used as option characters
cgoesche [Fri, 22 Aug 2025 21:31:24 +0000 (17:31 -0400)] 
getopt: document special symbols that should not be used as option characters

getopt(3) routines return `?` or `:` when an unknown option character is encountered
or an option is missing its required argument, respectively. It also disallows
`;` as an option character. Documenting this makes users aware that they may not use
these reserved symbols as option characters, e.g. `-?` which is used in some older programs.

Addresses: #2995
Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
(cherry picked from commit 9b4f1ca3342bdff7e1c3d8eaf3735cf821f407bc)

8 days agozramctl: fix MEM-USED column description
Jérôme Poulin [Fri, 22 Aug 2025 03:54:17 +0000 (23:54 -0400)] 
zramctl: fix MEM-USED column description

The MEM-USED column was incorrectly documented as showing current
memory consumption. This is due to confusing naming in the kernel's
zram implementation:

- Kernel field "mem_used_total" (3rd in mm_stat) = current memory usage
- Kernel field "mem_used_max" (5th in mm_stat) = peak memory usage

zramctl maps these as:
- TOTAL column <= mem_used_total (current usage)
- MEM-USED column <= mem_used_max (peak usage)

The misleading "MEM-USED" name suggests current usage, but it actually
shows the peak memory usage (high water mark) since device creation
or last reset. This is tracked by the kernel's max_used_pages which
only increases when current usage exceeds the stored maximum.

Fixed description from:
"memory zram have been consumed to store compressed data" to
"peak memory usage to store compressed data".

Mise à jour de la traduction française.

(cherry picked from commit 616c88fb9565017c1a08c8869d2559b8d218c443)

8 days agoinclude/mount-api-utils: avoid using sys/mount.h
Karel Zak [Thu, 21 Aug 2025 07:59:10 +0000 (09:59 +0200)] 
include/mount-api-utils: avoid using sys/mount.h

The file is unnecessary and introduces duplicate #define of MS_* macros.

Fixes: https://github.com/util-linux/util-linux/issues/3674
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 2a9b48d20d74f65ac708b3bcee6a7e2a61aadf88)

8 days agoliblastlog2: markup fixes for man pages
Mario Blättermann [Thu, 21 Aug 2025 07:35:47 +0000 (09:35 +0200)] 
liblastlog2: markup fixes for man pages

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit d6c72456dc5e88fe124e0299840352d12ee8aa05)

8 days agologger: fix incorrect warning message when both --file and a message are specified
Alexander Kappner [Wed, 13 Aug 2025 11:10:28 +0000 (04:10 -0700)] 
logger: fix incorrect warning message when both --file and a message are specified

Logger warns that when both --file and a message are given, the message is ignored.
It does the opposite. Fix the warning message to conform to the observed behavior.

Example:
echo "You will not see this file in the log" > file.txt
logger -f file.txt "You will see this message in the log"

Signed-off-by: Alexander Kappner <agk@godking.net>
(cherry picked from commit 2a31355b11c3714cac2b6b60565b639aa32388f1)

8 days agomkfs.cramfs: avoid uninitialized value [coverity scan]
Karel Zak [Tue, 29 Jul 2025 09:40:16 +0000 (11:40 +0200)] 
mkfs.cramfs: avoid uninitialized value [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit c24654e0d5976fac7f785b8bf4f8217cc1df2772)

8 days agotests/helpers/test_sigstate.c: explicitly reset SIGINT to default action after trapping
Hongxu Jia [Mon, 28 Jul 2025 12:35:13 +0000 (20:35 +0800)] 
tests/helpers/test_sigstate.c: explicitly reset SIGINT to default action after trapping

After upgrading bash to 5.3 to contain commit [1], if SIGINT was trapped in
asynchronous subshell, bash called set_signal_async_ignored to make sure
processes that are created by this asynchronous subshell to ignore SIGINT.

And it caused test case `kill/decode' failed, the signal INT was existed in
both of Blocked and Ignored

$ ./tests/run.sh --use-system-commands --parsable --show-diff   kill/decode
...
diff-{{{
|--- /usr/lib/util-linux/ptest/tests/expected/kill/decode        2011-04-05 23:00:00.000000000 +0000
|+++ /usr/lib/util-linux/ptest/tests/output/kill/decode  2025-07-28 12:09:46.279000000 +0000
@@ -16,5 +16,5 @@
 Pending (thread): INT ILL
 Pending (process): USR1
 Blocked: INT ILL ABRT FPE USR1 SEGV TERM
-Ignored: HUP QUIT TRAP PIPE ALRM
+Ignored: HUP INT QUIT TRAP PIPE ALRM
 Caught: ILL USR1
}}}-diff
...

Explicitly reset SIGINT to default action after trapping, then the
test case `kill/decode' works on both of old (<5.3) and new (>=5.3) bash

[1] https://cgit.git.savannah.gnu.org/cgit/bash.git/commit/?h=devel&id=a5d2617c7a7e602ace1f4149987cdfd075c4e762

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
(cherry picked from commit 6d46bbc0896b963486546d5d1b3d9241a2d5d0f8)

8 days agolibblkid: (ext) reduce false positive
胡玮文 [Mon, 28 Jul 2025 06:32:13 +0000 (14:32 +0800)] 
libblkid: (ext) reduce false positive

Signed-off-by: 胡玮文 <huweiwen.hww@alibaba-inc.com>
(cherry picked from commit 0c5d55e52d27be933e9e61b82bd386943bd9e05c)

8 days agosetpriv: Improve getgroups() Portability
Karel Zak [Mon, 21 Jul 2025 06:16:25 +0000 (08:16 +0200)] 
setpriv: Improve getgroups() Portability

setpriv(1) is Linux-only, and on Linux, getgroups() returns at least one group.
However, it's better to use more portable and generic code patterns and assume
that getgroups() can return zero.

Fixes: https://github.com/util-linux/util-linux/issues/3654
Reported-by: Alejandro Colomar <alx@kernel.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 434a5633a563066357bbc3f331838ed41041ec1a)

8 days agolibblkid: improve UUID_SUB= description
Karel Zak [Thu, 24 Jul 2025 10:48:00 +0000 (12:48 +0200)] 
libblkid: improve UUID_SUB= description

Fixes: https://github.com/util-linux/util-linux/issues/3657
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit fc56a4c50a009ea6850f6c585cbbd53819399ed4)

8 days agofsck.cramfs: check buffer size for memcpy()
Karel Zak [Mon, 21 Jul 2025 07:48:06 +0000 (09:48 +0200)] 
fsck.cramfs: check buffer size for memcpy()

- reuse MAX_INPUT_NAMELEN
- check path buffer size before memcpy() to the buffer
- check for zero path before use it

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit caf79c6073bed928653ed4a8c495c5f111973afb)

8 days agotests: add color names test
Karel Zak [Mon, 25 Aug 2025 11:07:21 +0000 (13:07 +0200)] 
tests: add color names test

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 36a3c19e9a10afe83c9f3e6570521ad4ad252ef2)

8 days agolib/color-names: fix stupid bugs
Karel Zak [Mon, 25 Aug 2025 10:05:01 +0000 (12:05 +0200)] 
lib/color-names: fix stupid bugs

- sort "white" -> "yellow"
- fix typo "lightgray,"

Fixes: https://github.com/util-linux/util-linux/issues/2863
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 1b9e3ffd2e4e1e18c6056c572547e1803923487e)

8 days agolib/color-names: Fix color name canonicalization
Karel Zak [Tue, 15 Jul 2025 13:35:05 +0000 (15:35 +0200)] 
lib/color-names: Fix color name canonicalization

Return NULL rather than a random string if it cannot be translated to
the color sequence.

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 44ebe68c24da0bcf5aa1f48017d47d2d8995b0ed)

8 days agolib/path: avoid double free() for cpusets
Karel Zak [Wed, 2 Jul 2025 10:25:45 +0000 (12:25 +0200)] 
lib/path: avoid double free() for cpusets

Addresses: https://github.com/util-linux/util-linux/issues/3641
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 4581ede384f22983d6155768635ce43cb5304cb0)

8 days agolsblk: fix possible use-after-free
Karel Zak [Wed, 2 Jul 2025 09:48:22 +0000 (11:48 +0200)] 
lsblk: fix possible use-after-free

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 02955d9434396df4019132351d8264b74811dc3f)

8 days agobash-completion: fix function name of enosys completion
Koichi Murase [Tue, 1 Jul 2025 13:39:23 +0000 (22:39 +0900)] 
bash-completion: fix function name of enosys completion

The function "_enosys_module" referenced by the completion setting on
the last line of "bash-completion/enosys" is not defined in the
current master.  As reported in Ref. [1], this causes the following
error on an attempt at argument completion for the "enosys" command:

  bash: _enosys_module: command not found

[1] https://www.reddit.com/r/Fedora/comments/1llmu0w/comment/n00y98k/

Also, the function "_waitpid_module" defined in
"bash-completion/enosys" overwrites another completion function of the
same name defined in "bash-completion/waitpid".  This patch renames
the function in "bash-completion/enosys" to the correct one,
"_enosys_module".

(cherry picked from commit c83058dcd3a4dc703d64e245eff2d5db281a1b79)

8 days agolsblk: fix memory leak [coverity scan]
Karel Zak [Tue, 1 Jul 2025 08:00:19 +0000 (10:00 +0200)] 
lsblk: fix memory leak [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit b13f60104b646b45dc9bf43408e6fdec03382ad9)

8 days agoman: Replace RETURN VALUE with EXIT STATUS in section 1
Jesse Rosenstock [Mon, 30 Jun 2025 18:32:49 +0000 (20:32 +0200)] 
man: Replace RETURN VALUE with EXIT STATUS in section 1

According to man-pages(7), sections 1 and 8 should normally use
EXIT STATUS, while sections 2 and 3 should use RETURN VALUE.

https://man7.org/linux/man-pages/man7/man-pages.7.html

Signed-off-by: Jesse Rosenstock <jmr@google.com>
(cherry picked from commit 9dc97c99ae5b501a941dd31485671309a8f94573)

8 days agomore: temporarily ignore stdin when waiting for stderr
Karel Zak [Mon, 30 Jun 2025 10:20:13 +0000 (12:20 +0200)] 
more: temporarily ignore stdin when waiting for stderr

more waits for user commands on stderr, but at the same time, it
monitors sigalfd and stdin (for data and POLLHUP|POLLNVAL). We need to
temporarily ignore stdin if there is new data waiting for read()
(e.g., dmesg | more); otherwise, more_key_command() will end in a busy
loop.

Fixes: https://github.com/util-linux/util-linux/issues/3634
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 85cbb5f5449be75d51b064681f0d92adf31f59be)

8 days agolib/strutils: add ul_ prefix to strrep() and strrem() functions
Karel Zak [Mon, 30 Jun 2025 09:15:30 +0000 (11:15 +0200)] 
lib/strutils: add ul_ prefix to strrep() and strrem() functions

Addresses: https://github.com/util-linux/util-linux/issues/3626
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 7bb1151e559710f18682454384c99d7cd67f35fb)

8 days agolib/strutils: add ul_ prefix to split() function
Karel Zak [Mon, 30 Jun 2025 09:15:30 +0000 (11:15 +0200)] 
lib/strutils: add ul_ prefix to split() function

Addresses: https://github.com/util-linux/util-linux/issues/3626
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 6b627aa34d2977eb347b32040c1c3075daad3d1d)

8 days agolib/strutils: add ul_ prefix to strappend() functions
Karel Zak [Mon, 30 Jun 2025 09:15:30 +0000 (11:15 +0200)] 
lib/strutils: add ul_ prefix to strappend() functions

Addresses: https://github.com/util-linux/util-linux/issues/3626
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit d42e5e4bc355277b820d98768e2fda52e2d08e76)

8 days agolib/strutils: add ul_ prefix to strconcat() functions
Karel Zak [Mon, 30 Jun 2025 09:15:30 +0000 (11:15 +0200)] 
lib/strutils: add ul_ prefix to strconcat() functions

Addresses: https://github.com/util-linux/util-linux/issues/3626
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit c128ee3ea488174230065f6a35286e01e98996f8)

8 days agolsblk: use md as fallback TYPE when md/level empty
codefiles [Sat, 28 Jun 2025 00:53:16 +0000 (20:53 -0400)] 
lsblk: use md as fallback TYPE when md/level empty

(cherry picked from commit 6bed45b965b22c8ea5c10c43320c19cf84fd8cfa)

8 days agogitignore: Ignore tests/diff/ and test/output/
Jesse Rosenstock [Fri, 27 Jun 2025 08:27:25 +0000 (10:27 +0200)] 
gitignore: Ignore tests/diff/ and test/output/

These are auto-generated and clutter git status.
It's even worse with jj, which will auto-add them.

Signed-off-by: Jesse Rosenstock <jmr@google.com>
(cherry picked from commit e9c21d2977ac480cec72720515630a1b0b8038d0)

8 days agolib/strutils: add ul_ prefix to startswith() and endswith()
Karel Zak [Mon, 30 Jun 2025 09:15:30 +0000 (11:15 +0200)] 
lib/strutils: add ul_ prefix to startswith() and endswith()

Addresses: https://github.com/util-linux/util-linux/issues/3626
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit aa07db0ac1449627b3926669b052b07a1d3986ca)

8 days agolib/strv: use ul_ prefix for strv functions
Karel Zak [Thu, 26 Jun 2025 11:47:00 +0000 (13:47 +0200)] 
lib/strv: use ul_ prefix for strv functions

The functions are originally from systemd/udev, so it's possible that
during static linking, they may collide with other systemd-based
components.

Fixes: https://github.com/util-linux/util-linux/issues/3626
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit f39ffccf2b9b8dcaaf2069346cc50735c2f0f95d)

8 days agobash-completion: add choom and coresched
Karel Zak [Thu, 26 Jun 2025 09:14:11 +0000 (11:14 +0200)] 
bash-completion: add choom and coresched

Addresses: https://github.com/util-linux/util-linux/issues/3469
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit ba5c614edc4407d5dacea6ce29c0a41f39883f02)

8 days agoAdd missing ;; to -m case (#1)
Nate Drake [Wed, 25 Jun 2025 22:39:05 +0000 (18:39 -0400)] 
Add missing ;; to -m case (#1)

(cherry picked from commit 565eb6370c76721bbd0d7fa292d9315a6856f627)

2 months agoldattach: add ifndef BOTHER
Karel Zak [Tue, 24 Jun 2025 09:14:29 +0000 (11:14 +0200)] 
ldattach: add ifndef BOTHER

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 5405c3e09057db82ed397e61443effa9614dbc4a)

2 months agobuild-sys: update release dates v2.41.1
Karel Zak [Tue, 24 Jun 2025 07:55:28 +0000 (09:55 +0200)] 
build-sys: update release dates

Signed-off-by: Karel Zak <kzak@redhat.com>
2 months agodocs: add v2.41.1-ReleaseNotes
Karel Zak [Tue, 24 Jun 2025 07:54:20 +0000 (09:54 +0200)] 
docs: add v2.41.1-ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
2 months agopo: update uk.po (from translationproject.org)
Yuri Chornoivan [Mon, 23 Jun 2025 11:48:07 +0000 (13:48 +0200)] 
po: update uk.po (from translationproject.org)

2 months agopo: update sr.po (from translationproject.org)
Мирослав Николић [Mon, 23 Jun 2025 11:48:07 +0000 (13:48 +0200)] 
po: update sr.po (from translationproject.org)

2 months agopo: update ro.po (from translationproject.org)
Remus-Gabriel Chelu [Mon, 23 Jun 2025 11:48:07 +0000 (13:48 +0200)] 
po: update ro.po (from translationproject.org)

2 months agopo: update pt.po (from translationproject.org)
Pedro Albuquerque [Mon, 23 Jun 2025 11:48:07 +0000 (13:48 +0200)] 
po: update pt.po (from translationproject.org)

2 months agopo: update pl.po (from translationproject.org)
Jakub Bogusz [Mon, 23 Jun 2025 11:48:06 +0000 (13:48 +0200)] 
po: update pl.po (from translationproject.org)

2 months agopo: update nl.po (from translationproject.org)
Benno Schulenberg [Mon, 23 Jun 2025 11:48:06 +0000 (13:48 +0200)] 
po: update nl.po (from translationproject.org)

2 months agopo: update ja.po (from translationproject.org)
YOSHIDA Hideki [Mon, 23 Jun 2025 11:48:06 +0000 (13:48 +0200)] 
po: update ja.po (from translationproject.org)

2 months agopo: update hr.po (from translationproject.org)
Božidar Putanec [Mon, 23 Jun 2025 11:48:06 +0000 (13:48 +0200)] 
po: update hr.po (from translationproject.org)

2 months agopo: update fr.po (from translationproject.org)
Frédéric Marchal [Mon, 23 Jun 2025 11:48:06 +0000 (13:48 +0200)] 
po: update fr.po (from translationproject.org)

2 months agopo: update es.po (from translationproject.org)
Antonio Ceballos Roa [Mon, 23 Jun 2025 11:48:06 +0000 (13:48 +0200)] 
po: update es.po (from translationproject.org)

2 months agopo: update de.po (from translationproject.org)
Mario Blättermann [Mon, 23 Jun 2025 11:48:06 +0000 (13:48 +0200)] 
po: update de.po (from translationproject.org)

2 months agopo: update cs.po (from translationproject.org)
Petr Písař [Mon, 23 Jun 2025 11:48:06 +0000 (13:48 +0200)] 
po: update cs.po (from translationproject.org)

2 months agopo-man: merge changes
Karel Zak [Mon, 23 Jun 2025 11:48:04 +0000 (13:48 +0200)] 
po-man: merge changes

2 months agopo-man: update sr.po (from translationproject.org)
Мирослав Николић [Mon, 23 Jun 2025 11:47:54 +0000 (13:47 +0200)] 
po-man: update sr.po (from translationproject.org)

2 months agopo-man: update de.po (from translationproject.org)
Mario Blättermann [Mon, 23 Jun 2025 11:47:54 +0000 (13:47 +0200)] 
po-man: update de.po (from translationproject.org)

2 months agohardlink: define more function as inline
Karel Zak [Tue, 29 Apr 2025 10:50:48 +0000 (12:50 +0200)] 
hardlink: define more function as inline

The functions are called many times.

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 5ef57d519fed61c501f1868348dcdfb31d3e2426)

2 months agohardlink: fix performance regression (inefficient signal evaluation)
Karel Zak [Tue, 29 Apr 2025 10:29:32 +0000 (12:29 +0200)] 
hardlink: fix performance regression (inefficient signal evaluation)

During work on better verbose output, I found a regression between
v2.40 and v2.41 (and v2.42). In the new version, hardlink is 3-4 times
slower.

The problem is in the function where we verify signals. It calls the
function signal() even though no signal is delivered. It's called in
code loops where hardlink scans files, making it a performance-sensitive
area.

Another significant performance improvement is using an inline function
for handle_interrupt().

This simple patch improves hardlink performance by 10 times.

Fixes: http://github.com/util-linux/util-linux/commit/1453200e22dd4ec858be027653c167225f2fb358
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 87831fa19e241803f93556cbeaad153e6ba89b6c)

2 months agohardlink: Use macro for verbose output
Karel Zak [Tue, 29 Apr 2025 09:49:23 +0000 (11:49 +0200)] 
hardlink: Use macro for verbose output

Now that jlog() is a function, all gettext() arguments are evaluated
in all cases, including when output is unnecessary due to --quiet or
low verbose mode.

Fixes: https://github.com/util-linux/util-linux/issues/3548
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 5a2600c55f278c1252708cb3bdede92e27ccd04e)

2 months agolibblkid: Fix crash while parsing config with libeconf
Stanislav Brabec [Fri, 16 May 2025 01:10:14 +0000 (03:10 +0200)] 
libblkid: Fix crash while parsing config with libeconf

As the whole econf_file structure is freed by econf_free(file) at the end
of blkid_read_config(), econf_file structure cannot be defined as static
and initialized only once. The econf_free() is not robust enough and keeps
a pointer to the garbage after the first call of blkid_read_config(). And
if /etc/blkid.conf does not exist, it is called second time.

Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
Cc: Stefan Schubert <schubi@suse.de>
Link: https://bugzilla.opensuse.org/show_bug.cgi?id=1242705
(cherry picked from commit 284527cff2bd22da2924881a4a4833049dca0d2e)

2 months agoDo not call exit() on code ending in shared libraries
Cristian Rodríguez [Sat, 17 May 2025 19:07:02 +0000 (15:07 -0400)] 
Do not call exit() on code ending in shared libraries

It is not cool to call atexit() handlers of unknown
applications from shared libraries, use _exit instead.

Signed-off-by: Cristian Rodríguez <cristian@rodriguez.im>
(cherry picked from commit 765b9259fa75e7cab64de4bcfdd2f49cb63efedb)

2 months agolscpu: fix possible buffer overflow in cpuinfo parser
Karel Zak [Tue, 20 May 2025 08:10:59 +0000 (10:10 +0200)] 
lscpu: fix possible buffer overflow in cpuinfo parser

Addresses: https://github.com/util-linux/util-linux/pull/3577
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit ea04d719352add738251446315cebdada90171a9)

2 months agolsblk: use ID_PART_ENTRY_SCHEME as fallback for PTTYPE
Karel Zak [Thu, 22 May 2025 08:01:03 +0000 (10:01 +0200)] 
lsblk: use ID_PART_ENTRY_SCHEME as fallback for PTTYPE

The udev database typically inherits the ID_PART_TABLE_TYPE property
from the entire disk device to its partitions. However, in some cases,
this property may be missing. Fortunately, blkid/udev also provides
ID_PART_ENTRY_SCHEME for all partitions.

Fixes: https://github.com/util-linux/util-linux/issues/3570
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 23a7e0865ad56c46a69084974182b9979592b867)

2 months agolscpu: Fix loongarch op-mode output with recent kernel
Xi Ruoyao [Thu, 22 May 2025 05:04:48 +0000 (13:04 +0800)] 
lscpu: Fix loongarch op-mode output with recent kernel

Since Linux-6.12, the "loongarch32" item in the ISA field is separated
to "loongarch32r" and "loongarch32s," breaking our expectation.

Link: https://git.kernel.org/torvalds/c/34e3c4500cdc
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
(cherry picked from commit 5aa7ad17fc17b9458ff4381294c27d176c651d5d)

2 months agoremove two leftover license lines from colors.{c,h}
Benno Schulenberg [Mon, 2 Jun 2025 14:14:31 +0000 (16:14 +0200)] 
remove two leftover license lines from colors.{c,h}

Last March, commit 549a517857 replaced the SPDX line in three files
with a "No copyright is claimed" phrase, but forgot to remove from
two of those files the text lines that correspond to the SPDX.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
(cherry picked from commit ca7b55217d3100ee2a1a7874fd643726bb2df04f)

2 months agoremove "Copyright (C) ...." notes from files that claim no copyright
Benno Schulenberg [Mon, 2 Jun 2025 14:14:32 +0000 (16:14 +0200)] 
remove "Copyright (C) ...." notes from files that claim no copyright

Replace them with a "Written by" or "Authors:" label.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
(cherry picked from commit 44da1cb11db3db73898918969a5c33f825458278)

2 months agocorrect the full name of the GPL in various files
Benno Schulenberg [Mon, 2 Jun 2025 14:14:33 +0000 (16:14 +0200)] 
correct the full name of the GPL in various files

Last year, commit f4cb44bd11 corrected the full name of the GPL in
a dozen files, but still left the mistaken name in eight places.

(Also, in the first file, just reshuffle the license line, to be
in the same position as in other files.)

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
(cherry picked from commit c4b2b66bad23e605dd6392921d0750770145e4a1)

2 months agoMake scols_column_set_data_func docs visible
FeRD (Frank Dana) [Mon, 9 Jun 2025 08:55:00 +0000 (04:55 -0400)] 
Make scols_column_set_data_func docs visible

The documentation comment for scols_column_set_data_func was missing the
second asterisk in its opening marker, causing the contents to be
omitted from the rendered documentation.

Signed-off-by: FeRD (Frank Dana) <ferdnyc@gmail.com>
(cherry picked from commit 84de06882e925b98b9cf7ffae2a37ae55931894d)

3 months agolibblkid/src/topology/dm: fix fscanf return value check to match expected number...
Mingjie Shen [Wed, 11 Jun 2025 21:11:35 +0000 (17:11 -0400)] 
libblkid/src/topology/dm: fix fscanf return value check to match expected number of parsed items

(cherry picked from commit 51c0697e5551fe3c2d481a4ac71d81695e5374ba)

3 months agotreewide: add ul_ to parse_timestamp() function name
Karel Zak [Tue, 13 May 2025 09:32:14 +0000 (11:32 +0200)] 
treewide: add ul_ to parse_timestamp() function name

Signed-off-by: Karel Zak <kzak@redhat.com>
3 months agotreewide: add ul_ to parse_switch() function name
Stanislav Brabec [Tue, 13 May 2025 09:26:49 +0000 (11:26 +0200)] 
treewide: add ul_ to parse_switch() function name

Signed-off-by: Karel Zak <kzak@redhat.com>
3 months agotreewide: add ul_ to parse_size() function name
Karel Zak [Tue, 13 May 2025 09:25:39 +0000 (11:25 +0200)] 
treewide: add ul_ to parse_size() function name

Signed-off-by: Karel Zak <kzak@redhat.com>
3 months agotreewide: add ul_ to parse_range() function name
Karel Zak [Tue, 13 May 2025 09:24:48 +0000 (11:24 +0200)] 
treewide: add ul_ to parse_range() function name

Signed-off-by: Karel Zak <kzak@redhat.com>
3 months agolibmount: (subdir) restrict for real mounts only
Karel Zak [Wed, 9 Apr 2025 10:15:57 +0000 (12:15 +0200)] 
libmount: (subdir) restrict for real mounts only

It's now possible to use, for example, for bind operations, but it
does not make sense as you can specify the target with the
subdirectory.

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 437a271f7108f689d350f1b3d837490d3d283c3c)

3 months agolibmount: (subdir) remove unused code
Karel Zak [Wed, 9 Apr 2025 09:32:08 +0000 (11:32 +0200)] 
libmount: (subdir) remove unused code

The optlist already handles quoted values, so there's no need to do it
in the callers.

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 5462fa3435544344727b8644205ae427dfd5fcba)

4 months agoWipefs: improve --all descriptions for whole-disks
Karel Zak [Thu, 24 Apr 2025 17:25:11 +0000 (19:25 +0200)] 
Wipefs: improve --all descriptions for whole-disks

Addresses: https://github.com/util-linux/util-linux/issues/3544
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 1806792d4fd4928e09228ca6cc776fb46b196d89)

4 months agolibmount: avoid calling memset() unnecessarily
Karel Zak [Thu, 24 Apr 2025 16:32:35 +0000 (18:32 +0200)] 
libmount: avoid calling memset() unnecessarily

This is primarily to satisfy static analyzers, as memset() is defined
as a non-null function (although it does nothing when bufsiz=0).

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 9e96e6ed9cce4cbaf3b9ca6e61d0b0ee070685e9)

4 months agolibblkid: befs: fix underflow
Milan Broz [Sat, 19 Apr 2025 13:54:40 +0000 (15:54 +0200)] 
libblkid: befs: fix underflow

Fix segfault caused by underflow while parsing a corrupted metadata.

Found by OSS-Fuzz by cryptsetup project fuzzers (issue 411003898).

Signed-off-by: Milan Broz <gmazyland@gmail.com>
(cherry picked from commit 588eed1a1de13150750e8a50d855001b27e07357)

4 months agoDo not use strerror on shared libraries
Cristian Rodríguez [Sun, 13 Apr 2025 13:22:47 +0000 (09:22 -0400)] 
Do not use strerror on shared libraries

Using strerror is not safe in shared libraries as it is unknown
what the calling apps may do with the storage behind the scenes.
Using %m is ok, except in contexts that need to be as-safe.

(cherry picked from commit c5850c36e14085cddf8db9e19d447d928fa153d0)

4 months agomount: (man) add missing word
Jakub Wilk [Wed, 9 Apr 2025 17:53:34 +0000 (19:53 +0200)] 
mount: (man) add missing word

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
(cherry picked from commit 1f106f63c5c9ab6779621f42c280d1f23792f898)

4 months agoinclude/mount-api-utils: include linux/unistd.h
Thomas Weißschuh [Sat, 19 Apr 2025 20:02:11 +0000 (22:02 +0200)] 
include/mount-api-utils: include linux/unistd.h

If SYS_statmount/SYS_listmount is not provided by the libc,
util-linux will fall back to __NR_statmount/__NR_listmount from the
kernel UAPI headers.
However it is not guaranteed that these symbols are actually visible in
mount-api-utils.

Include linux/unistd.h which provides syscall numbers.
While this header is specific to Linux, the code is already using
linux/mount.h.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
(cherry picked from commit 0033f97482a7979e0de71de0a16b583e8d74dbdc)

5 months agomeson: add feature for translated documentation
Thomas Weißschuh [Mon, 14 Apr 2025 21:32:36 +0000 (23:32 +0200)] 
meson: add feature for translated documentation

Translating the documentation is slow.
Add a feature which can be used to disable this step.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
(cherry picked from commit 188f3af3e8f3c7effbdb4b91994f1b16db4874b5)

5 months agomeson: remove tinfo dependency from 'more'
Thomas Weißschuh [Mon, 14 Apr 2025 21:19:06 +0000 (23:19 +0200)] 
meson: remove tinfo dependency from 'more'

The more utility does not need libtinfo and it is not
specified in autotools either.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
(cherry picked from commit 363e48da01956321fb9337c59d78865c97c711a2)

5 months agolibuuid: fix uuid_time on macOS without attribute((alias))
Eugene Gershnik [Mon, 6 May 2024 16:29:39 +0000 (09:29 -0700)] 
libuuid: fix uuid_time on macOS without attribute((alias))

Weak aliases are not supported by clang on Darwin.
Instead this fix uses inline asm to make `_uuid_time` an alias to
`___uuid_time`

It appears that on macOS the time API is purely 32 or 64 bit depending
on the build type. There is no ABI issue on that platform and `uuid_time`
can be unconditionally aliased to `_uuid_time`. This is all conjectural,
however, since I have no ability to make 32-bit builds for macOS - the
Apple toolchain doesn't support this since 2019.

Fixes util-linux/util-linux#2873

(cherry picked from commit e47c6f751a7ef87640c61316ada774e8e9cc6b07)

5 months agofindmnt: fix -k option parsing regression
Karel Zak [Mon, 7 Apr 2025 10:35:02 +0000 (12:35 +0200)] 
findmnt: fix -k option parsing regression

It's a really bad idea to change any existing short option to support
optional arguments.

Fixes: https://github.com/util-linux/util-linux/issues/3512
References: 841d15e5d13dd0cc56e450c8dcc592211d66be27
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 0ecaef693ea60aab709e79dd4a8eb2865ec08967)

5 months agotreewide: fix optional arguments usage
Karel Zak [Mon, 7 Apr 2025 11:49:43 +0000 (13:49 +0200)] 
treewide: fix optional arguments usage

In some parts of the code, the optional argument handling is missing
for cases where the argument starts with '='. This is particularly
important for short options with optional arguments, as suggested by
our man pages. The libc getopt_long() handles this for long options,
but for short options, it's our responsibility.

Note that some argument parsing functions (mostly colormode_or_err())
already implement this, as they are usually used with optional
arguments.

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit c4a24f5301ec9779a0492dd110824c2ce813f3eb)

5 months agonamespace.h: fix compilation on Linux < 4.10
Thomas Devoogdt [Mon, 7 Apr 2025 12:20:12 +0000 (14:20 +0200)] 
namespace.h: fix compilation on Linux < 4.10

sys-utils/lsns.c: In function ‘add_namespace_from_sock’:
sys-utils/lsns.c:580:19: error: ‘SIOCGSKNS’ undeclared (first use in this function)
  nsfd = ioctl(sk, SIOCGSKNS);
                   ^~~~~~~~~

SIOCGSKNS was added in https://github.com/torvalds/linux/commit/c62cce2caee558e18aa05c01c2fd3b40f07174f2.

Fixes: https://github.com/util-linux/util-linux/issues/3502
Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
(cherry picked from commit 10ee66ed1b08586bde42582e34355418eef33ef5)

5 months agofdisk: fix possible memory leak
Karel Zak [Tue, 25 Mar 2025 11:44:13 +0000 (12:44 +0100)] 
fdisk: fix possible memory leak

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 71719680968c86a09ad0ba76339447f18996610b)

5 months agofdformat: use size_t and ssize_t
Karel Zak [Tue, 25 Mar 2025 11:23:35 +0000 (12:23 +0100)] 
fdformat: use size_t and ssize_t

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 310806a25f1da9e1e6819c57d2e358bb439ed56d)

5 months agocfdisk: fix memory leak and possible NULL dereference [gcc-analyzer]
Karel Zak [Tue, 25 Mar 2025 11:14:14 +0000 (12:14 +0100)] 
cfdisk: fix memory leak and possible NULL dereference [gcc-analyzer]

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 33ca468b67d34dead8fb8b41dc9f328971e5fe70)