]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
4 weeks agokill: add support for race-free process kills using pidfd inodes
Christian Goeschel Ndjomouo [Mon, 25 Aug 2025 18:04:19 +0000 (14:04 -0400)] 
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>
4 weeks agofallocate: update FALLOC_FL_WRITE_ZEROES
Karel Zak [Mon, 1 Sep 2025 12:10:17 +0000 (14:10 +0200)] 
fallocate: update FALLOC_FL_WRITE_ZEROES

Update to Zhang Yi's latest version of the patch.

Unfortunately, I missed that he was still working on it (it was sent
to the kernel mailing lists rather than the util-linux mailing list).

Signed-off-by: Karel Zak <kzak@redhat.com>
4 weeks agoMerge branch 'master' of https://github.com/mariobl/util-linux
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

4 weeks agoMerge branch 'lsfd--no-hypertext' of https://github.com/masatake/util-linux
Karel Zak [Mon, 1 Sep 2025 10:27:35 +0000 (12:27 +0200)] 
Merge branch 'lsfd--no-hypertext' of https://github.com/masatake/util-linux

* 'lsfd--no-hypertext' of https://github.com/masatake/util-linux:
  lsfd: revise the code disabling hyperlinks

4 weeks agoMerge branch 'zramctl-max_comp_streams_fix' of https://github.com/mentha/util-linux
Karel Zak [Mon, 1 Sep 2025 10:17:15 +0000 (12:17 +0200)] 
Merge branch 'zramctl-max_comp_streams_fix' of https://github.com/mentha/util-linux

* 'zramctl-max_comp_streams_fix' of https://github.com/mentha/util-linux:
  zramctl: ignore ENOENT when setting max_comp_streams

4 weeks agoMerge branch 'fix/findmnt_output_regression' of https://github.com/cgoesche/util...
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

4 weeks agoMerge branch 'man-ipcrm' of https://github.com/PrasannaPaithankar/util-linux
Karel Zak [Mon, 1 Sep 2025 08:13:48 +0000 (10:13 +0200)] 
Merge branch 'man-ipcrm' of https://github.com/PrasannaPaithankar/util-linux

* 'man-ipcrm' of https://github.com/PrasannaPaithankar/util-linux:
  man: Fixed incorrect ipcrm options

4 weeks agoMerge branch 'feat/improve_umount_bash_comp' of https://github.com/cgoesche/util...
Karel Zak [Mon, 1 Sep 2025 08:12:04 +0000 (10:12 +0200)] 
Merge branch 'feat/improve_umount_bash_comp' of https://github.com/cgoesche/util-linux-fork

* 'feat/improve_umount_bash_comp' of https://github.com/cgoesche/util-linux-fork:
  bash-completion: add fallback to filename expansion for umount

4 weeks agolsfd: revise the code disabling hyperlinks
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.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
5 weeks agoFix markup in pam_lastlog2.8.adoc
Mario Blättermann [Sun, 31 Aug 2025 15:43:41 +0000 (17:43 +0200)] 
Fix markup in pam_lastlog2.8.adoc

5 weeks agoFix markup in ll2_import_lastlog.3.adoc
Mario Blättermann [Sun, 31 Aug 2025 15:41:38 +0000 (17:41 +0200)] 
Fix markup in ll2_import_lastlog.3.adoc

5 weeks agoFix markup in more.1.adoc
Mario Blättermann [Sun, 31 Aug 2025 15:39:17 +0000 (17:39 +0200)] 
Fix markup in more.1.adoc

5 weeks agoFix markup in column.1.adoc
Mario Blättermann [Sun, 31 Aug 2025 15:38:04 +0000 (17:38 +0200)] 
Fix markup in column.1.adoc

5 weeks agoFix markup in mesg.1.adoc
Mario Blättermann [Sun, 31 Aug 2025 15:35:15 +0000 (17:35 +0200)] 
Fix markup in mesg.1.adoc

5 weeks agoFix markup in unshare.1.adoc
Mario Blättermann [Sun, 31 Aug 2025 15:34:12 +0000 (17:34 +0200)] 
Fix markup in unshare.1.adoc

5 weeks agoFix markup in swapon.8.adoc
Mario Blättermann [Sun, 31 Aug 2025 15:32:27 +0000 (17:32 +0200)] 
Fix markup in swapon.8.adoc

5 weeks agoFix typos and markup in setpriv.1.adoc
Mario Blättermann [Sun, 31 Aug 2025 15:30:44 +0000 (17:30 +0200)] 
Fix typos and markup in setpriv.1.adoc

5 weeks agoFix markup in lsirq.1.adoc
Mario Blättermann [Sun, 31 Aug 2025 15:28:36 +0000 (17:28 +0200)] 
Fix markup in lsirq.1.adoc

5 weeks agoFix markup in flock.1.adoc
Mario Blättermann [Sun, 31 Aug 2025 15:26:46 +0000 (17:26 +0200)] 
Fix markup in flock.1.adoc

5 weeks agoFix markup in chmem.8.adoc
Mario Blättermann [Sun, 31 Aug 2025 15:24:29 +0000 (17:24 +0200)] 
Fix markup in chmem.8.adoc

5 weeks agoFix markup in lastlog2.8.adoc
Mario Blättermann [Sun, 31 Aug 2025 15:22:41 +0000 (17:22 +0200)] 
Fix markup in lastlog2.8.adoc

5 weeks agoFix markup in findmnt.8.adoc
Mario Blättermann [Sun, 31 Aug 2025 15:21:42 +0000 (17:21 +0200)] 
Fix markup in findmnt.8.adoc

5 weeks agoFix markup in su.1.adoc
Mario Blättermann [Sun, 31 Aug 2025 15:20:01 +0000 (17:20 +0200)] 
Fix markup in su.1.adoc

5 weeks agoFix markup in login.1.adoc
Mario Blättermann [Sun, 31 Aug 2025 15:18:22 +0000 (17:18 +0200)] 
Fix markup in login.1.adoc

5 weeks agoFix markup in scols-filter.5.adoc
Mario Blättermann [Sun, 31 Aug 2025 15:15:48 +0000 (17:15 +0200)] 
Fix markup in scols-filter.5.adoc

5 weeks 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>
5 weeks 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>
5 weeks 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>
5 weeks agoMerge branch 'zfs-reflinks' of https://github.com/lordcheeto/util-linux
Karel Zak [Thu, 28 Aug 2025 12:21:54 +0000 (14:21 +0200)] 
Merge branch 'zfs-reflinks' of https://github.com/lordcheeto/util-linux

* 'zfs-reflinks' of https://github.com/lordcheeto/util-linux:
  Add reflink support for ZFS.

5 weeks agobash-completion: add fallback to filename expansion for umount
Christian Goeschel Ndjomouo [Thu, 28 Aug 2025 03:26:42 +0000 (23:26 -0400)] 
bash-completion: add fallback to filename expansion for umount

If the user defined path can not be found in the mount table
fallback to simple filename expansion.

Addresses: #1333
Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
5 weeks agoAdd reflink support for ZFS.
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.

5 weeks agogetopt: add member posixly_correct to struct getopt_control
Christian Goeschel Ndjomouo [Wed, 27 Aug 2025 08:53:11 +0000 (04:53 -0400)] 
getopt: add member posixly_correct to struct getopt_control

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
5 weeks agogetopt: add feature to ignore unknown options
Christian Goeschel Ndjomouo [Wed, 27 Aug 2025 08:30:49 +0000 (04:30 -0400)] 
getopt: add feature to ignore unknown options

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>
5 weeks agoMerge branch 'PR/color-names-fixes' of https://github.com/karelzak/util-linux-work
Karel Zak [Tue, 26 Aug 2025 09:26:48 +0000 (11:26 +0200)] 
Merge branch 'PR/color-names-fixes' of https://github.com/karelzak/util-linux-work

* 'PR/color-names-fixes' of https://github.com/karelzak/util-linux-work:
  tests: add color names test
  lib/color-names: fix stupid bugs

5 weeks agoMerge branch 'sfdisk/args' of https://github.com/t-8ch/util-linux
Karel Zak [Tue, 26 Aug 2025 09:26:21 +0000 (11:26 +0200)] 
Merge branch 'sfdisk/args' of https://github.com/t-8ch/util-linux

* 'sfdisk/args' of https://github.com/t-8ch/util-linux:
  sfdisk: reject spurious arguments for --reorder/--backup-pt-sectors

5 weeks agoMerge branch 'feat/add_microcode_to_lscpu_summary' of https://github.com/cgoesche...
Karel Zak [Tue, 26 Aug 2025 09:25:48 +0000 (11:25 +0200)] 
Merge branch 'feat/add_microcode_to_lscpu_summary' of https://github.com/cgoesche/util-linux-fork

* 'feat/add_microcode_to_lscpu_summary' of https://github.com/cgoesche/util-linux-fork:
  lscpu: add 'microcode' information to the CPU summary

5 weeks agoMerge branch 'fix/clarify_long_flag_in_getopt_script_examples' of https://github...
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

5 weeks agoMerge branch 'fix/fstrim_use_f_type_equal_macro' of https://github.com/cgoesche/util...
Karel Zak [Tue, 26 Aug 2025 09:24:34 +0000 (11:24 +0200)] 
Merge branch 'fix/fstrim_use_f_type_equal_macro' of https://github.com/cgoesche/util-linux-fork

* 'fix/fstrim_use_f_type_equal_macro' of https://github.com/cgoesche/util-linux-fork:
  fstrim: use F_TYPE_EQUAL() macro for statfs.f_type comparison

5 weeks agoMerge branch 'fix/procfs_use_f_type_equal_macro' of https://github.com/cgoesche/util...
Karel Zak [Tue, 26 Aug 2025 09:24:16 +0000 (11:24 +0200)] 
Merge branch 'fix/procfs_use_f_type_equal_macro' of https://github.com/cgoesche/util-linux-fork

* 'fix/procfs_use_f_type_equal_macro' of https://github.com/cgoesche/util-linux-fork:
  procfs: use F_TYPE_EQUAL() macro for statfs.f_type comparison

5 weeks agoMerge branch 'feat/support_lsblk_columns_env' of https://github.com/cgoesche/util...
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

5 weeks agoMerge branch 'fix/typo_in_lsblk_routine' of https://github.com/cgoesche/util-linux...
Karel Zak [Tue, 26 Aug 2025 09:20:44 +0000 (11:20 +0200)] 
Merge branch 'fix/typo_in_lsblk_routine' of https://github.com/cgoesche/util-linux-fork

* 'fix/typo_in_lsblk_routine' of https://github.com/cgoesche/util-linux-fork:
  lsblk: (typo) rename list_colunms() to list_columns()

5 weeks agoMerge branch 'fix/document_special_chars_in_getopt' of https://github.com/cgoesche...
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

5 weeks agoMerge branch 'master' of https://github.com/ticpu/util-linux
Karel Zak [Tue, 26 Aug 2025 09:19:23 +0000 (11:19 +0200)] 
Merge branch 'master' of https://github.com/ticpu/util-linux

* 'master' of https://github.com/ticpu/util-linux:
  zramctl: fix MEM-USED column description

5 weeks agoMerge branch 'PR/lscpu-extend-dmi' of https://github.com/karelzak/util-linux-work
Karel Zak [Tue, 26 Aug 2025 09:18:00 +0000 (11:18 +0200)] 
Merge branch 'PR/lscpu-extend-dmi' of https://github.com/karelzak/util-linux-work

* 'PR/lscpu-extend-dmi' of https://github.com/karelzak/util-linux-work:
  lscpu: use maximum CPU speed from DMI, avoid duplicate version string

5 weeks agoMerge branch 'lsfd--raw-decode-protocol' of https://github.com/masatake/util-linux
Karel Zak [Tue, 26 Aug 2025 09:17:15 +0000 (11:17 +0200)] 
Merge branch 'lsfd--raw-decode-protocol' of https://github.com/masatake/util-linux

* 'lsfd--raw-decode-protocol' of https://github.com/masatake/util-linux:
  lsfd: decode protocol numbers of RAW and RAW6 sockets

5 weeks agoMerge branch 'PR/mount-api-includes' of https://github.com/karelzak/util-linux-work
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

5 weeks agochmem: Remove commit - chmem print warnings about failures always
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)")

Signed-off-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
5 weeks agolscpu: add 'microcode' information to the CPU summary
cgoesche [Sun, 24 Aug 2025 00:25:36 +0000 (20:25 -0400)] 
lscpu: add 'microcode' information to the CPU summary

The procfs provides microcode revision information on
supported platforms (probably only x86 for now).
It can be useful to show this in the output of lscpu
for various use cases, e.g. applications that wish to
make sure that a specific microcode version has been
loaded.

Addresses: #3050
Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
5 weeks 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>
5 weeks 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>
6 weeks 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>
6 weeks agogetopt: clarify the use of '--long' instead of '--longoptions' in shell examples
cgoesche [Sat, 23 Aug 2025 01:52:29 +0000 (21:52 -0400)] 
getopt: clarify the use of '--long' instead of '--longoptions' in shell examples

Addresses: #2593
Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
6 weeks agofstrim: use F_TYPE_EQUAL() macro for statfs.f_type comparison
cgoesche [Sat, 23 Aug 2025 01:01:16 +0000 (21:01 -0400)] 
fstrim: use F_TYPE_EQUAL() macro for statfs.f_type comparison

Addresses: #2332
Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
6 weeks agoprocfs: use F_TYPE_EQUAL() macro for statfs.f_type comparison
cgoesche [Sat, 23 Aug 2025 00:56:48 +0000 (20:56 -0400)] 
procfs: use F_TYPE_EQUAL() macro for statfs.f_type comparison

Addresses: #2332
Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
6 weeks agolsblk: add support for LSBLK_COLUMNS environmental variable as an alternative to...
cgoesche [Sat, 23 Aug 2025 00:26:07 +0000 (20:26 -0400)] 
lsblk: add support for LSBLK_COLUMNS environmental variable as an alternative to --output

Addresses: #2816
Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
6 weeks agolsblk: (typo) rename list_colunms() to list_columns()
cgoesche [Fri, 22 Aug 2025 23:35:36 +0000 (19:35 -0400)] 
lsblk: (typo) rename list_colunms() to list_columns()

Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
6 weeks 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>
6 weeks 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.

6 weeks agolscpu: use maximum CPU speed from DMI, avoid duplicate version string
Karel Zak [Thu, 21 Aug 2025 09:35:17 +0000 (11:35 +0200)] 
lscpu: use maximum CPU speed from DMI, avoid duplicate version string

* Read maximum CPU speed from DMI
* Don't use max speed if nonsensical
* Avoid appending "CPU @ speed" to the version string if it's already included.
  (This is a code robustness improvement as DMI is currently read for ARMs only,
   and the issue was detected on Intel.)

Fixes: https://github.com/util-linux/util-linux/commit/a772d7c493afcec32f0123fc947013f74db6e45d
Signed-off-by: Karel Zak <kzak@redhat.com>
6 weeks agoMerge branch 'kill/usage-indent-comment-grammar' of https://github.com/WakeNaoki...
Karel Zak [Thu, 21 Aug 2025 08:59:25 +0000 (10:59 +0200)] 
Merge branch 'kill/usage-indent-comment-grammar' of https://github.com/WakeNaoki/util-linux

* 'kill/usage-indent-comment-grammar' of https://github.com/WakeNaoki/util-linux:
  kill: comments: fix grammar in parse_arguments()
  kill: usage: fix wrapped indent in -l/--list description

6 weeks agoinclude/mount-api-utils: update to recent kernel
Karel Zak [Thu, 21 Aug 2025 08:16:14 +0000 (10:16 +0200)] 
include/mount-api-utils: update to recent kernel

Signed-off-by: Karel Zak <kzak@redhat.com>
6 weeks 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>
6 weeks 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>
6 weeks agokill: comments: fix grammar in parse_arguments()
Naoki Wake [Tue, 19 Aug 2025 01:49:35 +0000 (18:49 -0700)] 
kill: comments: fix grammar in parse_arguments()

Insert 'that' so the sentence reads '... only option that can be
used with other options.' Comment-only change; no functional impact.

Signed-off-by: Naoki Wake <wakeke.rainbowearth@gmail.com>
6 weeks agokill: usage: fix wrapped indent in -l/--list description
Naoki Wake [Tue, 19 Aug 2025 01:46:08 +0000 (18:46 -0700)] 
kill: usage: fix wrapped indent in -l/--list description

Increase the indentation of the continuation line from one to two
spaces to match the common util-linux help style (see
Documentation/howto-usage-function.txt). This touches a translatable
string. Whitespace-only change; no functional impact.

Signed-off-by: Naoki Wake <wakeke.rainbowearth@gmail.com>
6 weeks agolsfd: decode protocol numbers of RAW and RAW6 sockets
Masatake YAMATO [Fri, 3 Jan 2025 18:50:01 +0000 (03:50 +0900)] 
lsfd: decode protocol numbers of RAW and RAW6 sockets

NOTE: this chage breaks compatibility of existing -Q expression used
in a shell script; the data type of RAW.PROTOCOL has changed from
<number> to <string>.

With this change, lsfd decodes RAW.PROTOCOL with a built-in table
based on linux/in.h and getprotobynumber(3) that may refer to
/etc/protocols internally.

In addition, this change adds RAW.PROTOCOL.RAW column that holds
the original protocol numbers.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
6 weeks agoMerge branch 'PR/fallocate-write-zeroes' of https://github.com/karelzak/util-linux...
Karel Zak [Wed, 20 Aug 2025 07:14:02 +0000 (09:14 +0200)] 
Merge branch 'PR/fallocate-write-zeroes' of https://github.com/karelzak/util-linux-work

* 'PR/fallocate-write-zeroes' of https://github.com/karelzak/util-linux-work:
  fallocate: add FALLOC_FL_WRITE_ZEROES support

6 weeks agolsclocks: stop using MAX_CLOCKS
Thomas Weißschuh [Tue, 19 Aug 2025 16:13:02 +0000 (18:13 +0200)] 
lsclocks: stop using MAX_CLOCKS

MAX_CLOCKS is only available in the kernel UAPI headers and not libc
headers. Switch back to a hardcoded value. This value is a stable ABI
anyways and matches the other fallback definitions.

Fixes: d3c49ee062f7 ("lsclocks: use MAX_CLOCKS, improve indention")
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
7 weeks agolsclocks: use MAX_CLOCKS, improve indention
Karel Zak [Thu, 14 Aug 2025 10:38:29 +0000 (12:38 +0200)] 
lsclocks: use MAX_CLOCKS, improve indention

Let's follow the kernel and use MAX_CLOCKS to define CLOCK_AUX.

Signed-off-by: Karel Zak <kzak@redhat.com>
7 weeks agoMerge branch 'lsclocks/auxclocks' of https://github.com/t-8ch/util-linux
Karel Zak [Thu, 14 Aug 2025 10:18:50 +0000 (12:18 +0200)] 
Merge branch 'lsclocks/auxclocks' of https://github.com/t-8ch/util-linux

* 'lsclocks/auxclocks' of https://github.com/t-8ch/util-linux:
  lsclocks: add auxiliary clocks

7 weeks agoMerge branch 'fix-logger-issue' of https://github.com/akappner/util-linux
Karel Zak [Thu, 14 Aug 2025 10:06:40 +0000 (12:06 +0200)] 
Merge branch 'fix-logger-issue' of https://github.com/akappner/util-linux

* 'fix-logger-issue' of https://github.com/akappner/util-linux:
  logger: fix incorrect warning message when both --file and a message are specified

7 weeks agoMerge branch 'PR/swapon-fstab' of https://github.com/karelzak/util-linux-work
Karel Zak [Thu, 14 Aug 2025 10:05:22 +0000 (12:05 +0200)] 
Merge branch 'PR/swapon-fstab' of https://github.com/karelzak/util-linux-work

* 'PR/swapon-fstab' of https://github.com/karelzak/util-linux-work:
  swapon: (man page) add details about fstab configuration

7 weeks 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>
7 weeks agofallocate: add FALLOC_FL_WRITE_ZEROES support
Zhang Yi [Wed, 13 Aug 2025 02:40:15 +0000 (10:40 +0800)] 
fallocate: add FALLOC_FL_WRITE_ZEROES support

The Linux kernel (since version 6.17) supports FALLOC_FL_WRITE_ZEROES in
fallocate(2). Add support for FALLOC_FL_WRITE_ZEROES to the fallocate
utility by introducing a new option -w|--write-zeroes.

Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=278c7d9b5e0c
Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
7 weeks agoswapon: (man page) add details about fstab configuration
Karel Zak [Tue, 12 Aug 2025 12:47:49 +0000 (14:47 +0200)] 
swapon: (man page) add details about fstab configuration

The fstab(5) man page already describes some basic aspects of "swap,"
but it makes sense to be more specific in the swapon man page and
describe everything in one place, serving as a normative reference for
what is expected on Linux in fstab for swap.

Fixes: https://github.com/util-linux/util-linux/issues/3667
Signed-off-by: Karel Zak <kzak@redhat.com>
7 weeks agolsclocks: add auxiliary clocks
Thomas Weißschuh [Mon, 2 Jun 2025 21:10:35 +0000 (23:10 +0200)] 
lsclocks: add auxiliary clocks

Add support for the auxiliary posix clocks introduced in Linux 6.17.

When auxiliary clocks are not supported, no output line is generated.
When an auxiliary clock is not enabled an output line without TIME
columns is generated.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
7 weeks agomount: add --beneath support
Karel Zak [Mon, 11 Aug 2025 11:08:13 +0000 (13:08 +0200)] 
mount: add --beneath support

Signed-off-by: Karel Zak <kzak@redhat.com>
7 weeks agolibmount: add MOVE_MOUNT_BENEATH support
Karel Zak [Mon, 11 Aug 2025 11:07:38 +0000 (13:07 +0200)] 
libmount: add MOVE_MOUNT_BENEATH support

Fixes: https://github.com/util-linux/util-linux/issues/2604
Signed-off-by: Karel Zak <kzak@redhat.com>
7 weeks agomount: (bash-completion) add --exclusive
Karel Zak [Mon, 11 Aug 2025 11:10:53 +0000 (13:10 +0200)] 
mount: (bash-completion) add --exclusive

Signed-off-by: Karel Zak <kzak@redhat.com>
7 weeks agoMerge branch 'PR/libmount-fanotify' of https://github.com/karelzak/util-linux-work
Karel Zak [Mon, 11 Aug 2025 09:22:10 +0000 (11:22 +0200)] 
Merge branch 'PR/libmount-fanotify' of https://github.com/karelzak/util-linux-work

* 'PR/libmount-fanotify' of https://github.com/karelzak/util-linux-work:
  libmount: ifdef for fanotify support on older systems
  libmount: (monitor) add fanotify_next_fs()
  libmount: (monitor) add basic fanotify support
  libmount: (monitor) rename public API to "mountinfo"
  libmount: (monitor) clean up mountinfo function names
  libmount: add mnt_fs_is_{moved,attached,detached} functions
  libmount: (monitor)  cleanup userspace_add_watch() exiting
  libmount: (monitor) check for utab delete
  libmount: (monitor) optimize inotify utab watch
  libmount: (monitor) cleanup op_process_event() return codes
  libmount: (monitor) add next-fs API
  libmount: (monitor) epoll_wait code consolidation
  libmount: (monitor) require entry-specific functions
  libmount: (monitor) clean up internal names
  libmount: (monitor) support type-specific data
  libmount: (monitor) support additional monitor identifiers
  libmount: split monitor code to more files

8 weeks agolibmount: ifdef for fanotify support on older systems
Karel Zak [Thu, 7 Aug 2025 11:15:32 +0000 (13:15 +0200)] 
libmount: ifdef for fanotify support on older systems

Signed-off-by: Karel Zak <kzak@redhat.com>
8 weeks agolibmount: (monitor) add fanotify_next_fs()
Karel Zak [Tue, 5 Aug 2025 13:39:53 +0000 (15:39 +0200)] 
libmount: (monitor) add fanotify_next_fs()

This function returns a unique filesystem ID to the caller.

Signed-off-by: Karel Zak <kzak@redhat.com>
8 weeks agochrt: (man,usage) put --pid first in synopses and examples, for clarity
Benno Schulenberg [Tue, 5 Aug 2025 09:24:43 +0000 (11:24 +0200)] 
chrt: (man,usage) put --pid first in synopses and examples, for clarity

When --pid is among the options, it is clearest when it is given as the
first option, because then it doesn't sit between the policy option and
the somewhat related priority value.  It creates some kind of symmetry:
the --pid option first, then other things, and the actual PID last.

CC: Madadi Vineeth Reddy <vineethr@linux.ibm.com>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
8 weeks agochrt: (man) improve wording and markup of some examples
Benno Schulenberg [Tue, 5 Aug 2025 09:24:42 +0000 (11:24 +0200)] 
chrt: (man) improve wording and markup of some examples

CC: Madadi Vineeth Reddy <vineethr@linux.ibm.com>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
8 weeks agochrt: (man,usage) mark the priority value as optional in the synopses
Benno Schulenberg [Tue, 5 Aug 2025 09:24:41 +0000 (11:24 +0200)] 
chrt: (man,usage) mark the priority value as optional in the synopses

The priority value is optional in some cases, so it cannot be listed
as required.

CC: Madadi Vineeth Reddy <vineethr@linux.ibm.com>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
8 weeks agochrt: produce better error message for missing priority with implied -r
Benno Schulenberg [Tue, 5 Aug 2025 09:24:40 +0000 (11:24 +0200)] 
chrt: produce better error message for missing priority with implied -r

Since commit 4c425142844d, the following two equivalent commands produce
different error messages:

  # chrt -r ls NEWS
  chrt: invalid priority argument: 'ls'
  # chrt ls NEWS
  chrt: unsupported priority value for the policy: 0: see --max for valid range

The latter error message is enigmatic: where did the user specify '0'?

Before the mentioned commit, the second command would produce the same
error message as the first.  Restore that behavior.

CC: Madadi Vineeth Reddy <vineethr@linux.ibm.com>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
8 weeks agolibmount: (monitor) add basic fanotify support
Karel Zak [Wed, 11 Jun 2025 11:49:05 +0000 (13:49 +0200)] 
libmount: (monitor) add basic fanotify support

* add mnt_monitor_enable_fanotify() to add the new monitor

* add MNT_MONITOR_TYPE_FANOTIFY to identify events

* add new monitor to the test

Signed-off-by: Karel Zak <kzak@redhat.com>
8 weeks agolibmount: (monitor) rename public API to "mountinfo"
Karel Zak [Wed, 6 Aug 2025 12:09:12 +0000 (14:09 +0200)] 
libmount: (monitor) rename public API to "mountinfo"

There will be more kernel monitors in the future. Ensure the API is
easy to understand.

* Rename MNT_MONITOR_TYPE_KERNEL to MNT_MONITOR_TYPE_MOUNTINFO

* Rename mnt_monitor_enable_kernel() to mnt_monitor_enable_mountinfo()

The change is backward compatible; the old names are still usable.

Signed-off-by: Karel Zak <kzak@redhat.com>
8 weeks agolibmount: (monitor) clean up mountinfo function names
Karel Zak [Wed, 6 Aug 2025 11:48:27 +0000 (13:48 +0200)] 
libmount: (monitor) clean up mountinfo function names

There will be more kernel monitors in the future. It's better to use
names specific to the monitoring method rather than the generic
"kernel."

This commit renames only internal components.

Signed-off-by: Karel Zak <kzak@redhat.com>
8 weeks agolibmount: add mnt_fs_is_{moved,attached,detached} functions
Karel Zak [Wed, 16 Jul 2025 11:52:07 +0000 (13:52 +0200)] 
libmount: add mnt_fs_is_{moved,attached,detached} functions

Let's use these simple functions to report what the last operation or
status detected by the library means to the filesystem. It will be
used by the fanotify monitor as well.

Signed-off-by: Karel Zak <kzak@redhat.com>
8 weeks agolibmount: (monitor) cleanup userspace_add_watch() exiting
Karel Zak [Wed, 11 Jun 2025 09:38:10 +0000 (11:38 +0200)] 
libmount: (monitor)  cleanup userspace_add_watch() exiting

Signed-off-by: Karel Zak <kzak@redhat.com>
8 weeks agolibmount: (monitor) check for utab delete
Karel Zak [Tue, 10 Jun 2025 12:06:53 +0000 (14:06 +0200)] 
libmount: (monitor) check for utab delete

Also, monitor for "rm -rf /run/mount" to reinitialize the monitor.

Signed-off-by: Karel Zak <kzak@redhat.com>
8 weeks agolibmount: (monitor) optimize inotify utab watch
Karel Zak [Tue, 10 Jun 2025 11:51:23 +0000 (13:51 +0200)] 
libmount: (monitor) optimize inotify utab watch

Don't repeat no-op inotify_add_watch() calls. This happens when we
monitor the /run[/mount] directory before the utab.event file exists.
The old version just tries to create a watch and ignores ENOENT
errors. It seems better to remember the path of the last created watch
and not repeat it.

Signed-off-by: Karel Zak <kzak@redhat.com>
8 weeks agolibmount: (monitor) cleanup op_process_event() return codes
Karel Zak [Tue, 10 Jun 2025 10:15:28 +0000 (12:15 +0200)] 
libmount: (monitor) cleanup op_process_event() return codes

Let's use usual concept (<0 error; 0 success; 1 nothing).

Signed-off-by: Karel Zak <kzak@redhat.com>
8 weeks agolibmount: (monitor) add next-fs API
Karel Zak [Tue, 10 Jun 2025 09:05:20 +0000 (11:05 +0200)] 
libmount: (monitor) add next-fs API

Signed-off-by: Karel Zak <kzak@redhat.com>
8 weeks agolibmount: (monitor) epoll_wait code consolidation
Karel Zak [Wed, 28 May 2025 09:18:57 +0000 (11:18 +0200)] 
libmount: (monitor) epoll_wait code consolidation

The epoll_wait() and op_process_event() are called in two places. Move
the code to read_epoll_events() and process everything in one place

Signed-off-by: Karel Zak <kzak@redhat.com>
8 weeks agolibmount: (monitor) require entry-specific functions
Karel Zak [Tue, 27 May 2025 11:23:39 +0000 (13:23 +0200)] 
libmount: (monitor) require entry-specific functions

8 weeks agolibmount: (monitor) clean up internal names
Karel Zak [Tue, 27 May 2025 11:14:34 +0000 (13:14 +0200)] 
libmount: (monitor) clean up internal names

In future changes, we need to process active monitor entries in entry
type-specific code to return data from events.

This requires a slight change in the function's logic, so it makes
sense to rename the function according to the new logic, meaning
changes --> active, verify --> process.

The patch also replaces bit fields with booleans.

Signed-off-by: Karel Zak <kzak@redhat.com>
8 weeks agolibmount: (monitor) support type-specific data
Karel Zak [Tue, 27 May 2025 10:04:24 +0000 (12:04 +0200)] 
libmount: (monitor) support type-specific data

Signed-off-by: Karel Zak <kzak@redhat.com>
8 weeks agolibmount: (monitor) support additional monitor identifiers
Karel Zak [Wed, 21 May 2025 10:39:17 +0000 (12:39 +0200)] 
libmount: (monitor) support additional monitor identifiers

This is necessary to support multiple monitors of the same type.
Currently, only one monitor per type is supported.

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