]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
7 days agoman: use symbolic link instead of symlink
Christian Goeschel Ndjomouo [Mon, 20 Apr 2026 02:05:00 +0000 (22:05 -0400)] 
man: use symbolic link instead of symlink

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
7 days agoman: use superblock term consistently
Christian Goeschel Ndjomouo [Mon, 20 Apr 2026 01:57:15 +0000 (21:57 -0400)] 
man: use superblock term consistently

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
7 days agoman: use the term 'real-time' more consistently
Christian Goeschel Ndjomouo [Mon, 20 Apr 2026 01:54:49 +0000 (21:54 -0400)] 
man: use the term 'real-time' more consistently

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
7 days agoman: use 'pseudoterminal' instead of 'pseudo[- ]terminal'
Christian Goeschel Ndjomouo [Mon, 20 Apr 2026 01:50:38 +0000 (21:50 -0400)] 
man: use 'pseudoterminal' instead of 'pseudo[- ]terminal'

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
7 days agoman: use 'pathname' instead of 'path name'
Christian Goeschel Ndjomouo [Mon, 20 Apr 2026 01:46:34 +0000 (21:46 -0400)] 
man: use 'pathname' instead of 'path name'

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
7 days agoman: use 'nonzero' instead of 'non-zero'
Christian Goeschel Ndjomouo [Mon, 20 Apr 2026 01:45:27 +0000 (21:45 -0400)] 
man: use 'nonzero' instead of 'non-zero'

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
7 days agoman: use 'uppercase' instead of 'upper case'
Christian Goeschel Ndjomouo [Mon, 20 Apr 2026 01:44:28 +0000 (21:44 -0400)] 
man: use 'uppercase' instead of 'upper case'

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
7 days agoman: use 'lowercase' instead of 'lower case'
Christian Goeschel Ndjomouo [Mon, 20 Apr 2026 01:43:35 +0000 (21:43 -0400)] 
man: use 'lowercase' instead of 'lower case'

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
7 days agoman: (lastlog) fix minor wording inconsistency
Christian Goeschel Ndjomouo [Mon, 20 Apr 2026 01:39:30 +0000 (21:39 -0400)] 
man: (lastlog) fix minor wording inconsistency

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
7 days agoman: use 'filesystem(s)' instead of 'file system(s)'
Christian Goeschel Ndjomouo [Mon, 20 Apr 2026 01:38:20 +0000 (21:38 -0400)] 
man: use 'filesystem(s)' instead of 'file system(s)'

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
7 days agoman: use 'filename(s)' instead of 'file name(s)'
Christian Goeschel Ndjomouo [Mon, 20 Apr 2026 01:34:37 +0000 (21:34 -0400)] 
man: use 'filename(s)' instead of 'file name(s)'

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
7 days agoman: use 'Epoch' instead of 'epoch'
Christian Goeschel Ndjomouo [Mon, 20 Apr 2026 01:29:59 +0000 (21:29 -0400)] 
man: use 'Epoch' instead of 'epoch'

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
7 days agoFix error message handling in sample/test code
Tobias Stoeckmann [Sat, 18 Apr 2026 08:24:04 +0000 (10:24 +0200)] 
Fix error message handling in sample/test code

- Remove extra newline in errx messages
- Use fprintf/exit for usage to avoid repeated program name
- Improve signal safety by using appropriate functions

This code is not installed, thus no functional change in final
installation of util-linux.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
7 days agoMerge branch 'scriptreplay-manpage-step-fix' of https://github.com/koraynilay/util...
Karel Zak [Tue, 21 Apr 2026 11:24:53 +0000 (13:24 +0200)] 
Merge branch 'scriptreplay-manpage-step-fix' of https://github.com/koraynilay/util-linux

* 'scriptreplay-manpage-step-fix' of https://github.com/koraynilay/util-linux:
  scriptreplay(man): Add right arrow documentation

7 days agoMerge branch 'hexdump_ll' of https://github.com/stoeckmann/util-linux
Karel Zak [Tue, 21 Apr 2026 11:22:22 +0000 (13:22 +0200)] 
Merge branch 'hexdump_ll' of https://github.com/stoeckmann/util-linux

* 'hexdump_ll' of https://github.com/stoeckmann/util-linux:
  hexdump: Cast %ll argument to long long

7 days agoMerge branch 'fallocate_checks' of https://github.com/stoeckmann/util-linux
Karel Zak [Tue, 21 Apr 2026 11:15:38 +0000 (13:15 +0200)] 
Merge branch 'fallocate_checks' of https://github.com/stoeckmann/util-linux

* 'fallocate_checks' of https://github.com/stoeckmann/util-linux:
  fallocate: Add range check
  fallocate: Improve argument range check
  fallocate: Use off_t instead of loff_t
  fallocate: Remove outdated copyright statement
  fallocate: Use correct formatters and casts

7 days agoMerge branch 'pidfd_get_inode' of https://github.com/stoeckmann/util-linux
Karel Zak [Tue, 21 Apr 2026 11:09:07 +0000 (13:09 +0200)] 
Merge branch 'pidfd_get_inode' of https://github.com/stoeckmann/util-linux

* 'pidfd_get_inode' of https://github.com/stoeckmann/util-linux:
  pidfd-utils: Fix pidfd_get_inode declaration

7 days agoMerge branch 'mkfs_cramfs_fsize' of https://github.com/stoeckmann/util-linux
Karel Zak [Tue, 21 Apr 2026 11:06:48 +0000 (13:06 +0200)] 
Merge branch 'mkfs_cramfs_fsize' of https://github.com/stoeckmann/util-linux

* 'mkfs_cramfs_fsize' of https://github.com/stoeckmann/util-linux:
  mkfs.cramfs: Improve file size check

7 days ago[po-man] Add missing languages to po4a.cfg
Mario Blättermann [Mon, 20 Apr 2026 16:42:12 +0000 (18:42 +0200)] 
[po-man] Add missing languages to po4a.cfg

8 days agoman: use 'built-in' instead of 'builtin'
Christian Goeschel Ndjomouo [Mon, 20 Apr 2026 01:26:28 +0000 (21:26 -0400)] 
man: use 'built-in' instead of 'builtin'

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
8 days agoman: use 'bit mask' instead of 'bitmask'
Christian Goeschel Ndjomouo [Mon, 20 Apr 2026 01:24:16 +0000 (21:24 -0400)] 
man: use 'bit mask' instead of 'bitmask'

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
8 days agoscriptreplay(man): Add right arrow documentation
koraynilay [Sun, 19 Apr 2026 20:48:09 +0000 (22:48 +0200)] 
scriptreplay(man): Add right arrow documentation

This feature was added with PR #3015 (and issue #2999),
but it was missing from the docs/--help

Signed-off-by: koraynilay <koray.fra@gmail.com>
9 days agohexdump: Cast %ll argument to long long
Tobias Stoeckmann [Sat, 18 Apr 2026 19:14:24 +0000 (21:14 +0200)] 
hexdump: Cast %ll argument to long long

Cast off_t for F_ADDRESS to long long. In most cases, this should be
actually unsigned long long due to %llx or %llo, but since %lld is also
available and off_t is signed, keep it at that.

In theory, this might fix very intelligent static analysers which notice
that off_t is long int but %ll expects long long, but in reality, this
fixes 32 bit off_t builds. Without this, wrong addresses are shown.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
9 days agofallocate: Add range check
Tobias Stoeckmann [Sat, 18 Apr 2026 16:17:13 +0000 (18:17 +0200)] 
fallocate: Add range check

Make sure that offset + length does not overflow off_t.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
9 days agofallocate: Improve argument range check
Tobias Stoeckmann [Sat, 18 Apr 2026 16:15:47 +0000 (18:15 +0200)] 
fallocate: Improve argument range check

If length or offset arguments are invalid, fail early on and add more
information about what went wrong. Also simplify later argument checks.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
9 days agofallocate: Use off_t instead of loff_t
Tobias Stoeckmann [Sat, 18 Apr 2026 16:07:12 +0000 (18:07 +0200)] 
fallocate: Use off_t instead of loff_t

Eventually, the loff_t values are used as arguments for functions which
expect an off_t. Use off_t directly and, while at it, introduce a proper
range check in cvtnum.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
9 days agofallocate: Remove outdated copyright statement
Tobias Stoeckmann [Sat, 18 Apr 2026 16:05:54 +0000 (18:05 +0200)] 
fallocate: Remove outdated copyright statement

The cvtnum internals have been replaced with a strtosize call, which
makes the xfsprogs copyright statement obsolete.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
9 days agofallocate: Use correct formatters and casts
Tobias Stoeckmann [Sat, 18 Apr 2026 16:02:28 +0000 (18:02 +0200)] 
fallocate: Use correct formatters and casts

The loff_t data type is signed, so use %jd and intmax_t for highest
portability.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
9 days agopidfd-utils: Fix pidfd_get_inode declaration
Tobias Stoeckmann [Sat, 18 Apr 2026 15:31:22 +0000 (17:31 +0200)] 
pidfd-utils: Fix pidfd_get_inode declaration

The pidfd_get_inode function returns a uint64_t, not an ino_t.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
10 days agomkfs.cramfs: Improve file size check
Tobias Stoeckmann [Sat, 18 Apr 2026 15:21:48 +0000 (17:21 +0200)] 
mkfs.cramfs: Improve file size check

Check st.st_size (off_t) for actual file size instead of the possibly
already truncated entry->size (unsigned int) value. Otherwise files
larger than 4 GB might be silently truncated.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
10 days agowdctl: Remove newline from warning message
Tobias Stoeckmann [Sat, 18 Apr 2026 08:19:23 +0000 (10:19 +0200)] 
wdctl: Remove newline from warning message

The warnx function adds a newline by itself already.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
10 days agoeject: Remove newline from warning messages
Tobias Stoeckmann [Sat, 18 Apr 2026 08:18:49 +0000 (10:18 +0200)] 
eject: Remove newline from warning messages

The warnx function adds a newline by itself already.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
10 days agocopyfilerange: Remove newline from error messages
Tobias Stoeckmann [Sat, 18 Apr 2026 08:18:00 +0000 (10:18 +0200)] 
copyfilerange: Remove newline from error messages

The errx function adds a newline by itself already.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
10 days agosulogin: Remove newline from error messages
Tobias Stoeckmann [Sat, 18 Apr 2026 08:16:27 +0000 (10:16 +0200)] 
sulogin: Remove newline from error messages

The errx function adds a newline by itself already.

Some error messages are supposed to have newlines, but these can
be triggered before terminal setup has been performed.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
10 days agomkfs.minix: Remove newline from error message
Tobias Stoeckmann [Sat, 18 Apr 2026 08:15:37 +0000 (10:15 +0200)] 
mkfs.minix: Remove newline from error message

The errx function adds a newline by itself already.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
11 days agolibblkid: introduce sysfs_devno_is_dm_hidden() for pre-open check
Zdenek Kabelac [Fri, 17 Apr 2026 14:55:43 +0000 (16:55 +0200)] 
libblkid: introduce sysfs_devno_is_dm_hidden() for pre-open check

Stratis reuses the DM "private" UUID convention ("stratis-1-private")
but its devices are legitimately opened by tools like mkfs.xfs to
obtain device geometry.  The pre-open check added in the previous
commit (d05a84b22) used sysfs_devno_is_dm_private() which also
blocks Stratis devices, breaking mkfs.xfs on Stratis pools.

Introduce sysfs_devno_is_dm_hidden() which only checks for LVM
internal devices (the "LVM-<uuid>-<name>" UUID pattern).  A "hidden"
DM device is one that exists solely as a building block for another
DM target -- no user-space tool should normally open or write to it.

Use sysfs_devno_is_dm_hidden() in blkid_new_probe_from_filename()
so that Stratis devices remain accessible while LVM internal devices
are still skipped before open().

Signed-off-by: Zdenek Kabelac <zkabelac@redhat.com>
11 days agomeson: unify the feature checking
Thomas Weißschuh [Wed, 15 Apr 2026 18:37:37 +0000 (20:37 +0200)] 
meson: unify the feature checking

Currently there are two patterns in use to check for a feature:
* not get_feature().disabled()
* get_feature().allowed()

Both do the same, but the second variant is shorter and easier to read.

Always use the variant with allowed().

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
12 days agoMerge branch 'setpriv_econf' of https://github.com/stoeckmann/util-linux
Karel Zak [Thu, 16 Apr 2026 13:06:35 +0000 (15:06 +0200)] 
Merge branch 'setpriv_econf' of https://github.com/stoeckmann/util-linux

* 'setpriv_econf' of https://github.com/stoeckmann/util-linux:
  autotools: Fix setpriv build with econf

12 days agoinclude/fileutils: fix preprocessor indentation
Karel Zak [Thu, 16 Apr 2026 13:02:12 +0000 (15:02 +0200)] 
include/fileutils: fix preprocessor indentation

Signed-off-by: Karel Zak <kzak@redhat.com>
12 days agoMerge branch 'copyfilerange_syscall_fallback' of https://github.com/cgoesche/util...
Karel Zak [Thu, 16 Apr 2026 12:59:33 +0000 (14:59 +0200)] 
Merge branch 'copyfilerange_syscall_fallback' of https://github.com/cgoesche/util-linux-fork

* 'copyfilerange_syscall_fallback' of https://github.com/cgoesche/util-linux-fork:
  build: (copyfilerange) include syscall header check for fallback
  style: (misc-utils/copyfilerange.c) fix indentation
  include: (fileutils.h) add fallback for the copy_file_range syscall

12 days agoMerge branch 'blkid_usages_option_test' of https://github.com/cgoesche/util-linux...
Karel Zak [Thu, 16 Apr 2026 12:55:42 +0000 (14:55 +0200)] 
Merge branch 'blkid_usages_option_test' of https://github.com/cgoesche/util-linux-fork

* 'blkid_usages_option_test' of https://github.com/cgoesche/util-linux-fork:
  tests: fix grammar in functions.sh
  tests: (blkid) add test for --usages

12 days agonsenter: update shell selection documentation
Karel Zak [Thu, 16 Apr 2026 12:25:14 +0000 (14:25 +0200)] 
nsenter: update shell selection documentation

Update DESCRIPTION and add ENVIRONMENT section with SHELL entry,
documenting that when $SHELL is not set, the shell from the user's
passwd(5) entry is used before falling back to /bin/sh.

Addresses: https://github.com/util-linux/util-linux/issues/4242
Signed-off-by: Karel Zak <kzak@redhat.com>
12 days agounshare: update shell selection documentation
Karel Zak [Thu, 16 Apr 2026 12:25:10 +0000 (14:25 +0200)] 
unshare: update shell selection documentation

Update DESCRIPTION and add ENVIRONMENT section with SHELL entry,
documenting that when $SHELL is not set, the shell from the user's
passwd(5) entry is used before falling back to /bin/sh.

Addresses: https://github.com/util-linux/util-linux/issues/4242
Signed-off-by: Karel Zak <kzak@redhat.com>
12 days agoflock: document shell selection in man page
Karel Zak [Thu, 16 Apr 2026 12:25:03 +0000 (14:25 +0200)] 
flock: document shell selection in man page

Add ENVIRONMENT section with SHELL entry, documenting that flock uses
$SHELL with fallback to /bin/sh for non-interactive -c command
execution. The user's passwd(5) shell is not consulted.

Addresses: https://github.com/util-linux/util-linux/issues/4242
Signed-off-by: Karel Zak <kzak@redhat.com>
12 days agomore: update shell selection documentation
Karel Zak [Thu, 16 Apr 2026 12:24:53 +0000 (14:24 +0200)] 
more: update shell selection documentation

Document that when $SHELL is not set, the shell from the user's
passwd(5) entry is used before falling back to /bin/sh.

Addresses: https://github.com/util-linux/util-linux/issues/4242
Signed-off-by: Karel Zak <kzak@redhat.com>
12 days agoscriptlive: update shell selection documentation
Karel Zak [Thu, 16 Apr 2026 12:24:42 +0000 (14:24 +0200)] 
scriptlive: update shell selection documentation

Document that when $SHELL is not set, the shell from the user's
passwd(5) entry is used before falling back to /bin/sh. Add missing
SHELL entry to the ENVIRONMENT section.

Addresses: https://github.com/util-linux/util-linux/issues/4242
Signed-off-by: Karel Zak <kzak@redhat.com>
12 days agoscript: update shell selection documentation
Karel Zak [Thu, 16 Apr 2026 12:24:08 +0000 (14:24 +0200)] 
script: update shell selection documentation

Document that when $SHELL is not set, the shell from the user's
passwd(5) entry is used before falling back to /bin/sh.

Addresses: https://github.com/util-linux/util-linux/issues/4242
Signed-off-by: Karel Zak <kzak@redhat.com>
12 days agoMerge branch 'fix_flock_shell_regression' of https://github.com/cgoesche/util-linux...
Karel Zak [Thu, 16 Apr 2026 12:28:31 +0000 (14:28 +0200)] 
Merge branch 'fix_flock_shell_regression' of https://github.com/cgoesche/util-linux-fork

* 'fix_flock_shell_regression' of https://github.com/cgoesche/util-linux-fork:
  flock: re-enable the initial shell selection logic

12 days agoflock: re-enable the initial shell selection logic
Christian Goeschel Ndjomouo [Thu, 16 Apr 2026 04:18:59 +0000 (00:18 -0400)] 
flock: re-enable the initial shell selection logic

Commit 6651ae5 added /etc/passwd to the list of shells
to choose from before falling back to _PATH_BSHELL.
This introduced a regression as some tools dont expect
this behavior and assume that unsetting SHELLS is enough.

To re-establish the old behavior we can pass the UL_SHELL_NOPWD
flag to the ul_default_shell() helper to ignore shells in
/etc/passwd.

Addresses: #4242
Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
13 days agobuild: (copyfilerange) include syscall header check for fallback
Christian Goeschel Ndjomouo [Wed, 15 Apr 2026 12:17:40 +0000 (08:17 -0400)] 
build: (copyfilerange) include syscall header check for fallback

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
13 days agostyle: (misc-utils/copyfilerange.c) fix indentation
Christian Goeschel Ndjomouo [Thu, 9 Apr 2026 15:10:53 +0000 (11:10 -0400)] 
style: (misc-utils/copyfilerange.c) fix indentation

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
13 days agoinclude: (fileutils.h) add fallback for the copy_file_range syscall
Christian Goeschel Ndjomouo [Thu, 9 Apr 2026 15:08:41 +0000 (11:08 -0400)] 
include: (fileutils.h) add fallback for the copy_file_range syscall

Closes: #4212
Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
13 days agoMerge branch 'PR/irqtop-slang-vw_printw' of https://github.com/karelzak/util-linux...
Karel Zak [Wed, 15 Apr 2026 11:53:09 +0000 (13:53 +0200)] 
Merge branch 'PR/irqtop-slang-vw_printw' of https://github.com/karelzak/util-linux-work

* 'PR/irqtop-slang-vw_printw' of https://github.com/karelzak/util-linux-work:
  irqtop: use irqtop_puts() for pre-formatted table data
  irqtop: add vw_printw() fallback for slang builds

13 days agoMerge branch 'strutils_strtobool_missing_values' of https://github.com/cgoesche/util...
Karel Zak [Wed, 15 Apr 2026 11:52:09 +0000 (13:52 +0200)] 
Merge branch 'strutils_strtobool_missing_values' of https://github.com/cgoesche/util-linux-fork

* 'strutils_strtobool_missing_values' of https://github.com/cgoesche/util-linux-fork:
  lib: (strutils.c) add missing string values for boolean <false>

13 days agoMerge branch 'PR/lib-nls-fix' of https://github.com/karelzak/util-linux-work
Karel Zak [Wed, 15 Apr 2026 11:51:16 +0000 (13:51 +0200)] 
Merge branch 'PR/lib-nls-fix' of https://github.com/karelzak/util-linux-work

* 'PR/lib-nls-fix' of https://github.com/karelzak/util-linux-work:
  lib/pidutils, lib/pidfd-utils: use _() instead of N_() in err() calls

13 days agoMerge branch 'PR/lsblk-multidevice-mounts' of https://github.com/karelzak/util-linux...
Karel Zak [Wed, 15 Apr 2026 11:50:51 +0000 (13:50 +0200)] 
Merge branch 'PR/lsblk-multidevice-mounts' of https://github.com/karelzak/util-linux-work

* 'PR/lsblk-multidevice-mounts' of https://github.com/karelzak/util-linux-work:
  lsblk: show mountpoints for all multi-device filesystem members

13 days agoautotools: Fix setpriv build with econf
Tobias Stoeckmann [Thu, 9 Apr 2026 20:34:39 +0000 (22:34 +0200)] 
autotools: Fix setpriv build with econf

Link setpriv with libeconf if used due to its usage in lib/logindefs.c.

Closes: #4217
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
13 days agoMerge branch 'randutils' of https://github.com/stoeckmann/util-linux
Karel Zak [Wed, 15 Apr 2026 11:32:52 +0000 (13:32 +0200)] 
Merge branch 'randutils' of https://github.com/stoeckmann/util-linux

* 'randutils' of https://github.com/stoeckmann/util-linux:
  randutils: Move comment to correct place
  randutils: Keep track of randomness source
  randutils: Reduce function and macro visibility
  randutils: Remove unused rand_get_number

13 days agoMerge branch 'pri_translation' of https://github.com/stoeckmann/util-linux
Karel Zak [Wed, 15 Apr 2026 11:31:10 +0000 (13:31 +0200)] 
Merge branch 'pri_translation' of https://github.com/stoeckmann/util-linux

* 'pri_translation' of https://github.com/stoeckmann/util-linux:
  Avoid PRI specifiers in translated messages

13 days agolib/pwdutils: fix compiler warning [-Werror=maybe-uninitialized]
Karel Zak [Wed, 15 Apr 2026 11:27:06 +0000 (13:27 +0200)] 
lib/pwdutils: fix compiler warning [-Werror=maybe-uninitialized]

Signed-off-by: Karel Zak <kzak@redhat.com>
13 days agoAvoid PRI specifiers in translated messages
Tobias Stoeckmann [Sun, 12 Apr 2026 12:16:03 +0000 (14:16 +0200)] 
Avoid PRI specifiers in translated messages

Cast to intmax_t/uintmax_t and use their specifiers in translated
message to keep message IDs stable as pointed out by Thomas Weißschuh.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
13 days agoMerge branch 'printf-integers' of https://github.com/t-8ch/util-linux
Karel Zak [Wed, 15 Apr 2026 11:07:05 +0000 (13:07 +0200)] 
Merge branch 'printf-integers' of https://github.com/t-8ch/util-linux

* 'printf-integers' of https://github.com/t-8ch/util-linux:
  fdisk: use the correct format specifiers for integer types
  lib/procfs: return uint64_t from procfs_process_get_stat_nth()
  chrt: pass correct integer types to printf
  hardlink: avoid format string error for dev_t
  strutils: fix printf formats

13 days agoMerge branch 'kill_decode_test_known_fail' of https://github.com/cgoesche/util-linux...
Karel Zak [Wed, 15 Apr 2026 11:01:36 +0000 (13:01 +0200)] 
Merge branch 'kill_decode_test_known_fail' of https://github.com/cgoesche/util-linux-fork

* 'kill_decode_test_known_fail' of https://github.com/cgoesche/util-linux-fork:
  tests: (kill/decode) mark test as known-fail for inconsistent s390x/QEMU instances

13 days agoMerge branch 'getline_eof' of https://github.com/stoeckmann/util-linux
Karel Zak [Wed, 15 Apr 2026 10:49:37 +0000 (12:49 +0200)] 
Merge branch 'getline_eof' of https://github.com/stoeckmann/util-linux

* 'getline_eof' of https://github.com/stoeckmann/util-linux:
  irqtop/lsirq: Handle EOF in get_irqinfo
  newgrp: Correctly handle getline error

13 days agoMerge branch 'optarg' of https://github.com/stoeckmann/util-linux
Karel Zak [Wed, 15 Apr 2026 10:45:07 +0000 (12:45 +0200)] 
Merge branch 'optarg' of https://github.com/stoeckmann/util-linux

* 'optarg' of https://github.com/stoeckmann/util-linux:
  lsirq: Skip optarg duplication
  chmem: Skip optarg duplication
  getopt: Skip optarg duplication
  copyfilerange: Skip optarg duplication
  blkid: Fix memory leaks
  login: Skip optarg duplication
  lib/cpuset: Skip optarg duplication
  last: Skip optarg duplication

13 days agoMerge branch 'ci/meson' of https://github.com/t-8ch/util-linux
Karel Zak [Wed, 15 Apr 2026 10:37:38 +0000 (12:37 +0200)] 
Merge branch 'ci/meson' of https://github.com/t-8ch/util-linux

* 'ci/meson' of https://github.com/t-8ch/util-linux:
  ci: drop dependency from meson to autotools jobs
  ci: run CHECK phase for meson
  ci: run 'make checkusage' only for autotools build
  meson: build test_scols_termreduce

13 days agoMerge branch 'meson/statx' of https://github.com/t-8ch/util-linux
Karel Zak [Wed, 15 Apr 2026 10:20:37 +0000 (12:20 +0200)] 
Merge branch 'meson/statx' of https://github.com/t-8ch/util-linux

* 'meson/statx' of https://github.com/t-8ch/util-linux:
  meson: test for statx::stx_mnt_id in sys/stat.h

13 days agoMerge branch 'fix_tests_run_sh_script' of https://github.com/cgoesche/util-linux...
Karel Zak [Wed, 15 Apr 2026 10:18:54 +0000 (12:18 +0200)] 
Merge branch 'fix_tests_run_sh_script' of https://github.com/cgoesche/util-linux-fork

* 'fix_tests_run_sh_script' of https://github.com/cgoesche/util-linux-fork:
  tests: (run.sh) remove unused variable
  tests: (run.sh) fix coding style
  tests: (run.sh) remove extraneous case pattern

13 days agorandutils: Move comment to correct place
Tobias Stoeckmann [Sat, 28 Mar 2026 15:39:58 +0000 (16:39 +0100)] 
randutils: Move comment to correct place

The comment is only valid if compiled with getrandom support.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
13 days agorandutils: Keep track of randomness source
Tobias Stoeckmann [Sat, 28 Mar 2026 15:37:15 +0000 (16:37 +0100)] 
randutils: Keep track of randomness source

The mcookie utility wants to report the source of randomness, but even
prints getrandom if it failed to retrieve data through it.

Fix this modifying the return data type of ul_random_get_bytes. Instead
of returning a boolean, the actual source is returned. This avoids any
potential TOCTOU or erroneous output.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
13 days agoMerge branch 'blkid_no_part_details_test' of https://github.com/cgoesche/util-linux...
Karel Zak [Wed, 15 Apr 2026 10:13:17 +0000 (12:13 +0200)] 
Merge branch 'blkid_no_part_details_test' of https://github.com/cgoesche/util-linux-fork

* 'blkid_no_part_details_test' of https://github.com/cgoesche/util-linux-fork:
  tests: (blkid) add --no-part-details tests

13 days agoMerge branch 'last_precision' of https://github.com/stoeckmann/util-linux
Karel Zak [Wed, 15 Apr 2026 10:10:07 +0000 (12:10 +0200)] 
Merge branch 'last_precision' of https://github.com/stoeckmann/util-linux

* 'last_precision' of https://github.com/stoeckmann/util-linux:
  last: Use int for string precision modifier

13 days agorandutils: Reduce function and macro visibility
Tobias Stoeckmann [Sat, 28 Mar 2026 15:24:00 +0000 (16:24 +0100)] 
randutils: Reduce function and macro visibility

srand and rand are no longer used in the tree. In fact, all randomness
used in tree goes through ul_random_get_bytes.

Reduce macro and function visibility to randutils.c where they are still
used.

While at it, update comment.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
13 days agorandutils: Remove unused rand_get_number
Tobias Stoeckmann [Sat, 28 Mar 2026 15:20:50 +0000 (16:20 +0100)] 
randutils: Remove unused rand_get_number

The function is not used anymore.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
13 days agosetarch: fix bold markup for proc_pid_personality in SEE ALSO
Karel Zak [Wed, 15 Apr 2026 10:01:55 +0000 (12:01 +0200)] 
setarch: fix bold markup for proc_pid_personality in SEE ALSO

Signed-off-by: Karel Zak <kzak@redhat.com>
13 days agoMerge branch 'man_see_also' of https://github.com/stoeckmann/util-linux
Karel Zak [Wed, 15 Apr 2026 09:51:22 +0000 (11:51 +0200)] 
Merge branch 'man_see_also' of https://github.com/stoeckmann/util-linux

* 'man_see_also' of https://github.com/stoeckmann/util-linux:
  man: Unify SEE ALSO sections

13 days agoMerge branch 'autoconf_copyfilerange' of https://github.com/stoeckmann/util-linux
Karel Zak [Wed, 15 Apr 2026 09:47:09 +0000 (11:47 +0200)] 
Merge branch 'autoconf_copyfilerange' of https://github.com/stoeckmann/util-linux

* 'autoconf_copyfilerange' of https://github.com/stoeckmann/util-linux:
  build: Fix --disable-copyfilerange

13 days agoMerge branch 'improve_kill_manpage_pidino' of https://github.com/cgoesche/util-linux...
Karel Zak [Wed, 15 Apr 2026 09:46:35 +0000 (11:46 +0200)] 
Merge branch 'improve_kill_manpage_pidino' of https://github.com/cgoesche/util-linux-fork

* 'improve_kill_manpage_pidino' of https://github.com/cgoesche/util-linux-fork:
  kill: (man) improve PID:inode description

13 days agoMerge branch 'fix/issue_2838' of https://github.com/lRespublica/util-linux
Karel Zak [Wed, 15 Apr 2026 09:25:36 +0000 (11:25 +0200)] 
Merge branch 'fix/issue_2838' of https://github.com/lRespublica/util-linux

* 'fix/issue_2838' of https://github.com/lRespublica/util-linux:
  fdisk: fix trailing whitespace in user reply from readline completion

13 days agoMerge branch 'newgrp_less_confusing_error_message' of https://github.com/cgoesche...
Karel Zak [Wed, 15 Apr 2026 09:09:59 +0000 (11:09 +0200)] 
Merge branch 'newgrp_less_confusing_error_message' of https://github.com/cgoesche/util-linux-fork

* 'newgrp_less_confusing_error_message' of https://github.com/cgoesche/util-linux-fork:
  treewide: use err() instead of errx() where ul_get{userpw,grp}_str() fails
  lib: (pwdutils.c) improve error return protocol for callers

13 days agoMerge branch 'unshare_clear_environ' of https://github.com/cgoesche/util-linux-fork
Karel Zak [Wed, 15 Apr 2026 08:41:57 +0000 (10:41 +0200)] 
Merge branch 'unshare_clear_environ' of https://github.com/cgoesche/util-linux-fork

* 'unshare_clear_environ' of https://github.com/cgoesche/util-linux-fork:
  nsenter: use clearenv() only when it is available
  tests: (unshare) add --clear-env option tests
  tests: (test_strerror.c) use ARRAY_SIZE for better readability/portability
  tests: (test_strerror.c) add EPERM errno support
  bash-completion: (unshare) add --clear-env option
  unshare: (manpage) fix minor typos
  unshare: new option to prevent environment variable inheritance

# Conflicts:
# tests/helpers/test_strerror.c

2 weeks agotests: (kill/decode) mark test as known-fail for inconsistent s390x/QEMU instances
Christian Goeschel Ndjomouo [Mon, 13 Apr 2026 00:24:25 +0000 (20:24 -0400)] 
tests: (kill/decode) mark test as known-fail for inconsistent s390x/QEMU instances

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
2 weeks agoirqtop/lsirq: Handle EOF in get_irqinfo
Tobias Stoeckmann [Sun, 12 Apr 2026 11:22:13 +0000 (13:22 +0200)] 
irqtop/lsirq: Handle EOF in get_irqinfo

If an empty file is passed to get_irqinfo, getline fails without setting
errno because EOF is not an error condition, even though -1 is returned.

Suppress error message but keep the regular error handling.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2 weeks agonewgrp: Correctly handle getline error
Tobias Stoeckmann [Sun, 12 Apr 2026 11:20:35 +0000 (13:20 +0200)] 
newgrp: Correctly handle getline error

If getline fails, errno might be overridden by isatty, leading a wrong
error message.

Also, getline returns -1 on EOF. In which case errno is not set. Use a
custom error message and still handle this as an error condition.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2 weeks agolsirq: Skip optarg duplication
Tobias Stoeckmann [Sat, 11 Apr 2026 18:53:10 +0000 (20:53 +0200)] 
lsirq: Skip optarg duplication

The -i argument specfies an input filename. Skip the duplication,
which fixes memory leaks and reduces binary size.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2 weeks agochmem: Skip optarg duplication
Tobias Stoeckmann [Sat, 11 Apr 2026 18:52:28 +0000 (20:52 +0200)] 
chmem: Skip optarg duplication

The -z argument is only used for parsing without any modification of the
input string. Skip the duplication to fix memory leaks if -z is supplied
multiple times.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2 weeks agogetopt: Skip optarg duplication
Tobias Stoeckmann [Sat, 11 Apr 2026 18:51:41 +0000 (20:51 +0200)] 
getopt: Skip optarg duplication

The -n argument leaks memory if supplied multiple times. Simplify memory
management and reduce binary size.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2 weeks agocopyfilerange: Skip optarg duplication
Tobias Stoeckmann [Sat, 11 Apr 2026 18:49:58 +0000 (20:49 +0200)] 
copyfilerange: Skip optarg duplication

The -r arguments are collected in range_files array, which contains
strings which are used for opening files and error messages. Remove
duplication which simplifies memory handling and reduces binary size.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2 weeks agoblkid: Fix memory leaks
Tobias Stoeckmann [Sat, 11 Apr 2026 18:48:08 +0000 (20:48 +0200)] 
blkid: Fix memory leaks

If -L and -U arguments are supplied, optarg string duplication leaks
memory.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2 weeks agologin: Skip optarg duplication
Tobias Stoeckmann [Sat, 11 Apr 2026 18:38:56 +0000 (20:38 +0200)] 
login: Skip optarg duplication

Supplying -s multiple times leaks memory. The given optarg is
eventually set in a struct passwd and line 1657 is the only alternative
that sets a constant string, i.e. the data is neither freed nor
modified.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2 weeks agolib/cpuset: Skip optarg duplication
Tobias Stoeckmann [Sat, 11 Apr 2026 18:38:02 +0000 (20:38 +0200)] 
lib/cpuset: Skip optarg duplication

Fix potential memory leaks and clarify that content of these strings
is never modified. Won't happen since this is test code, but adjust it
for completeness.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2 weeks agofdisk: use the correct format specifiers for integer types
Thomas Weißschuh [Sun, 12 Apr 2026 06:03:15 +0000 (08:03 +0200)] 
fdisk: use the correct format specifiers for integer types

libfdisk and its tools don't always use the correct format specifiers.

Make sure that translated strings always use %ju, to keep the message
IDs stables.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 weeks agolast: Skip optarg duplication
Tobias Stoeckmann [Sat, 11 Apr 2026 18:35:56 +0000 (20:35 +0200)] 
last: Skip optarg duplication

The -f arguments are collected in files array, which contains strings
which are used for opening files and error messages. Remove duplication
which simplifies memory handling and reduces binary size.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2 weeks agolib/procfs: return uint64_t from procfs_process_get_stat_nth()
Thomas Weißschuh [Sun, 12 Apr 2026 06:08:26 +0000 (08:08 +0200)] 
lib/procfs: return uint64_t from procfs_process_get_stat_nth()

This functions uses ul_strtoul64() to parse the number. As indicated by
the name that can only handle uint64_t values. Passing it a pointer to
uintmax_t can produce a compiler warning.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 weeks agochrt: pass correct integer types to printf
Thomas Weißschuh [Sun, 12 Apr 2026 06:10:26 +0000 (08:10 +0200)] 
chrt: pass correct integer types to printf

The printf format %ju expects an 'uintmax_t'. Cast the values to make
sure the correct type is passed.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 weeks agohardlink: avoid format string error for dev_t
Thomas Weißschuh [Sun, 12 Apr 2026 06:09:24 +0000 (08:09 +0200)] 
hardlink: avoid format string error for dev_t

The real integer type of dev_t is unspecified.
Cast the value to make sure it matches the format specifier.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 weeks agostrutils: fix printf formats
Thomas Weißschuh [Sun, 12 Apr 2026 06:08:37 +0000 (08:08 +0200)] 
strutils: fix printf formats

Use the correct printf format placeholders for uint64_t and int64_t.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 weeks agoci: drop dependency from meson to autotools jobs
Thomas Weißschuh [Sun, 12 Apr 2026 06:31:03 +0000 (08:31 +0200)] 
ci: drop dependency from meson to autotools jobs

Meson is now a first-class support build system.
Run the CI for it right away.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 weeks agoci: run CHECK phase for meson
Thomas Weißschuh [Sun, 12 Apr 2026 06:26:24 +0000 (08:26 +0200)] 
ci: run CHECK phase for meson

Make sure that the code also works when built with meson.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2 weeks agoci: run 'make checkusage' only for autotools build
Thomas Weißschuh [Sun, 12 Apr 2026 06:01:43 +0000 (08:01 +0200)] 
ci: run 'make checkusage' only for autotools build

The CHECK phase may be built during a meson build,
but 'make checkusage' requires an autotools build.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>