]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
19 hours agoMerge branch 'fix-lsblk-empty-type' of https://github.com/codefiles/util-linux master
Karel Zak [Mon, 30 Jun 2025 09:34:36 +0000 (11:34 +0200)] 
Merge branch 'fix-lsblk-empty-type' of https://github.com/codefiles/util-linux

* 'fix-lsblk-empty-type' of https://github.com/codefiles/util-linux:
  lsblk: use md as fallback TYPE when md/level empty

3 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

3 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>
4 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>
4 days agoMerge branch 'master' of https://github.com/ndrake/util-linux
Karel Zak [Thu, 26 Jun 2025 09:02:59 +0000 (11:02 +0200)] 
Merge branch 'master' of https://github.com/ndrake/util-linux

* 'master' of https://github.com/ndrake/util-linux:
  Add missing ;; to -m case (#1)

5 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)

6 days agoscript: support non-option argument as command
WanBingjiang [Thu, 29 May 2025 08:39:46 +0000 (16:39 +0800)] 
script: support non-option argument as command

[kzak@redhat.com: - don't use POSIXLY_CORRECT, use "+" in getopt_long(),
                  - use strv_join() rather than local concat function]

Based-on: https://github.com/util-linux/util-linux/pull/3599
Fixes: https://github.com/util-linux/util-linux/issues/3481
Signed-off-by: Karel Zak <kzak@redhat.com>
6 days agomore: Add MORE_SHELL_LINES environmental variable
cgoesche [Fri, 13 Jun 2025 05:59:28 +0000 (01:59 -0400)] 
more: Add MORE_SHELL_LINES environmental variable

This provides an alternative way to set the number of lines per screenful, with the same
effect as the '-n' and '--lines' command line options.

[kzak@redhat.com: - use ul_strtou16()]

Addresses: #3476
Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
Signed-off-by: Karel Zak <kzak@redhat.com>
6 days agoinclude/strutils: add ul_strtou16()
Karel Zak [Tue, 24 Jun 2025 09:29:22 +0000 (11:29 +0200)] 
include/strutils: add ul_strtou16()

Signed-off-by: Karel Zak <kzak@redhat.com>
6 days 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>
6 days agoMerge branch 'PR/chrt-optional-prio' of https://github.com/karelzak/util-linux-work
Karel Zak [Tue, 24 Jun 2025 09:08:36 +0000 (11:08 +0200)] 
Merge branch 'PR/chrt-optional-prio' of https://github.com/karelzak/util-linux-work

* 'PR/chrt-optional-prio' of https://github.com/karelzak/util-linux-work:
  chrt: Make priority optional for policies that don't use it
  chrt: Only display current settings when no policy is specified
  chrt: Make minor cleanups in chrt

6 days agopo: update uk.po (from translationproject.org)
Yuri Chornoivan [Tue, 24 Jun 2025 08:22:17 +0000 (10:22 +0200)] 
po: update uk.po (from translationproject.org)

6 days agopo: update sr.po (from translationproject.org)
Мирослав Николић [Tue, 24 Jun 2025 08:22:17 +0000 (10:22 +0200)] 
po: update sr.po (from translationproject.org)

6 days agopo: update ro.po (from translationproject.org)
Remus-Gabriel Chelu [Tue, 24 Jun 2025 08:22:16 +0000 (10:22 +0200)] 
po: update ro.po (from translationproject.org)

6 days agopo: update pt.po (from translationproject.org)
Pedro Albuquerque [Tue, 24 Jun 2025 08:22:16 +0000 (10:22 +0200)] 
po: update pt.po (from translationproject.org)

6 days agopo: update pl.po (from translationproject.org)
Jakub Bogusz [Tue, 24 Jun 2025 08:22:16 +0000 (10:22 +0200)] 
po: update pl.po (from translationproject.org)

6 days agopo: update nl.po (from translationproject.org)
Benno Schulenberg [Tue, 24 Jun 2025 08:22:16 +0000 (10:22 +0200)] 
po: update nl.po (from translationproject.org)

6 days agopo: update ja.po (from translationproject.org)
YOSHIDA Hideki [Tue, 24 Jun 2025 08:22:16 +0000 (10:22 +0200)] 
po: update ja.po (from translationproject.org)

6 days agopo: update hr.po (from translationproject.org)
Božidar Putanec [Tue, 24 Jun 2025 08:22:16 +0000 (10:22 +0200)] 
po: update hr.po (from translationproject.org)

6 days agopo: update fr.po (from translationproject.org)
Frédéric Marchal [Tue, 24 Jun 2025 08:22:16 +0000 (10:22 +0200)] 
po: update fr.po (from translationproject.org)

6 days agopo: update es.po (from translationproject.org)
Antonio Ceballos Roa [Tue, 24 Jun 2025 08:22:16 +0000 (10:22 +0200)] 
po: update es.po (from translationproject.org)

6 days agopo: update de.po (from translationproject.org)
Mario Blättermann [Tue, 24 Jun 2025 08:22:16 +0000 (10:22 +0200)] 
po: update de.po (from translationproject.org)

6 days agopo: update cs.po (from translationproject.org)
Petr Písař [Tue, 24 Jun 2025 08:22:16 +0000 (10:22 +0200)] 
po: update cs.po (from translationproject.org)

6 days agopo-man: merge changes
Karel Zak [Tue, 24 Jun 2025 08:22:14 +0000 (10:22 +0200)] 
po-man: merge changes

6 days agopo-man: update sr.po (from translationproject.org)
Мирослав Николић [Tue, 24 Jun 2025 08:21:51 +0000 (10:21 +0200)] 
po-man: update sr.po (from translationproject.org)

6 days agopo-man: update de.po (from translationproject.org)
Mario Blättermann [Tue, 24 Jun 2025 08:21:51 +0000 (10:21 +0200)] 
po-man: update de.po (from translationproject.org)

7 days agochrt: Make priority optional for policies that don't use it
Madadi Vineeth Reddy [Sat, 21 Jun 2025 19:50:48 +0000 (01:20 +0530)] 
chrt: Make priority optional for policies that don't use it

Currently, chrt requires a priority argument even for scheduling
policies like SCHED_OTHER and SCHED_BATCH, which ignore it.

This change relaxes that requirement. Now, priority is only expected
for SCHED_FIFO and SCHED_RR. For other policies, a default value of 0
is set internally and no argument is required on the command line.

This simplifies usage when modifying runtime parameters like
--sched-runtime for non-realtime tasks.

For example, to change the EEVDF tunable base_slice, one currently
needs to run:
chrt -o -T 1000000 --pid 0 $PID

Passing '0' after --pid is not intutive and not required as priority
is not applicable to SCHED_OTHER tasks. Now with this patch, one can do:
chrt -o -T 1000000 --pid $PID

Passing '0' still works ensuring ABI doesn't break.

Signed-off-by: Madadi Vineeth Reddy <vineethr@linux.ibm.com>
7 days agochrt: Only display current settings when no policy is specified
Madadi Vineeth Reddy [Sat, 21 Jun 2025 19:50:47 +0000 (01:20 +0530)] 
chrt: Only display current settings when no policy is specified

Previously, running "chrt --pid <pid>" with no policy options
would display the process’s current scheduling attributes, but
specifying a policy without a priority (e.g. chrt --rr --pid <pid>)
would silently fallback to displaying the same info. This was
confusing, since a policy option normally implies an intent to
change something.

This patch changes the behavior so that
chrt --pid <pid> continues to show the current settings:

chrt --pid 10862
pid 10862's current scheduling policy:  SCHED_OTHER
pid 10862's current scheduling priority: 0
pid 10862's current runtime parameter:  2800000

If a policy is specified but no priority follows, chrt now
errors out:

chrt --rr --pid 10862
chrt: policy SCHED_RR requires a priority argument

Verbose output (-v) still prints the current settings when a
valid policy+priority is provided.

Signed-off-by: Madadi Vineeth Reddy <vineethr@linux.ibm.com>
7 days agochrt: Make minor cleanups in chrt
Madadi Vineeth Reddy [Sat, 21 Jun 2025 19:50:46 +0000 (01:20 +0530)] 
chrt: Make minor cleanups in chrt

Minor changes such as fixing an incorrect comment and aligning
the closing brace of an if condition in main() were made, along
with making the usage of --pid consistent across files instead
of -p, although -p still works, for better readability.

No functional change is intended.

Signed-off-by: Madadi Vineeth Reddy <vineethr@linux.ibm.com>
11 days agodocs: update mount options for 'ntfs3'
Johannes Schneider [Thu, 19 Jun 2025 18:41:40 +0000 (20:41 +0200)] 
docs: update mount options for 'ntfs3'

Cleanout the mount options, and import the options from the upstream
documentation found at https://docs.kernel.org/filesystems/ntfs3.html

Fixes: 847264af6 docs: update mount type to 'ntfs3'
Signed-off-by: Johannes Schneider <johannes.schneider@leica-geosystems.com>
11 days agolibmount: don't update utab when moving /run
Karel Zak [Thu, 19 Jun 2025 10:23:57 +0000 (12:23 +0200)] 
libmount: don't update utab when moving /run

It's bad idea to try update /run/mount/utab when moving any directory
in way to the file (like /run).

It's also unnecessary to prepare any updates if the utab file is
empty. This is already done for umount, and we can use it for mount
move as well.

Fixes: https://github.com/util-linux/util-linux/issues/3619
Signed-off-by: Karel Zak <kzak@redhat.com>
11 days agoinclude/strutils: Add startswithpath()
Karel Zak [Thu, 19 Jun 2025 10:23:27 +0000 (12:23 +0200)] 
include/strutils: Add startswithpath()

This is similar to startswith() but checks if the prefix is a complete
path or a complete subdirectory (needs to end with '/').

Signed-off-by: Karel Zak <kzak@redhat.com>
11 days agoMerge branch 'ntfs3-type-detection' of https://github.com/js731ca/util-linux
Karel Zak [Thu, 19 Jun 2025 08:45:14 +0000 (10:45 +0200)] 
Merge branch 'ntfs3-type-detection' of https://github.com/js731ca/util-linux

* 'ntfs3-type-detection' of https://github.com/js731ca/util-linux:
  bash-completion: update autocompletion list to 'ntfs3'
  docs: update mount type to 'ntfs3'
  tests: update expected type to 'ntfs3'
  libblkid/libmount: ntfs: return filesystem type 'ntfs3'

2 weeks agoMerge branch 'musl-kill-decode' of https://github.com/ChenQi1989/util-linux
Karel Zak [Mon, 16 Jun 2025 11:37:50 +0000 (13:37 +0200)] 
Merge branch 'musl-kill-decode' of https://github.com/ChenQi1989/util-linux

* 'musl-kill-decode' of https://github.com/ChenQi1989/util-linux:
  ts/kill/decode: use RTMIN from 'kill -L' instead of hardcoding 34

2 weeks agobash-completion: update autocompletion list to 'ntfs3'
Johannes Schneider [Fri, 13 Jun 2025 15:46:44 +0000 (17:46 +0200)] 
bash-completion: update autocompletion list to 'ntfs3'

Signed-off-by: Johannes Schneider <johannes.schneider@leica-geosystems.com>
2 weeks agodocs: update mount type to 'ntfs3'
Johannes Schneider [Fri, 13 Jun 2025 15:46:11 +0000 (17:46 +0200)] 
docs: update mount type to 'ntfs3'

Signed-off-by: Johannes Schneider <johannes.schneider@leica-geosystems.com>
2 weeks agotests: update expected type to 'ntfs3'
Johannes Schneider [Fri, 13 Jun 2025 15:45:30 +0000 (17:45 +0200)] 
tests: update expected type to 'ntfs3'

Signed-off-by: Johannes Schneider <johannes.schneider@leica-geosystems.com>
2 weeks agolibblkid/libmount: ntfs: return filesystem type 'ntfs3'
Johannes Schneider [Fri, 13 Jun 2025 13:55:31 +0000 (15:55 +0200)] 
libblkid/libmount: ntfs: return filesystem type 'ntfs3'

Change the returned filesystem type from 'ntfs' to 'ntfs3', to match
what the kernel/fs/ntfs3 driver calls register_filesystem on [1][2].
This same driver also registers itself as 'ntfs', but then runs in a
"legacy" mode [3] which forces the mount to stay RO.

Link: [1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/ntfs3/super.c?h=v6.12#n1794
Link: [2]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/ntfs3/super.c?h=v6.12#n1874
Link: [3]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/ntfs3/super.c?h=v6.12#n412
Signed-off-by: Johannes Schneider <johannes.schneider@leica-geosystems.com>
2 weeks 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

3 weeks agoMerge branch 'doc-col-set-data-func' of https://github.com/ferdnyc/util-linux
Karel Zak [Mon, 9 Jun 2025 12:43:13 +0000 (14:43 +0200)] 
Merge branch 'doc-col-set-data-func' of https://github.com/ferdnyc/util-linux

* 'doc-col-set-data-func' of https://github.com/ferdnyc/util-linux:
  Make scols_column_set_data_func docs visible

3 weeks agoMerge branch 'PR/Benno-2Jun' of https://github.com/karelzak/util-linux-work
Karel Zak [Mon, 9 Jun 2025 12:42:46 +0000 (14:42 +0200)] 
Merge branch 'PR/Benno-2Jun' of https://github.com/karelzak/util-linux-work

* 'PR/Benno-2Jun' of https://github.com/karelzak/util-linux-work:
  treewide: replace postal address in license specifier with a terse URL
  docs: stop the copyright verbiage from getting included in the POT file
  docs: make the "po4a:" line the first line, like in all other .adoc files
  correct the full name of the GPL in various files
  remove "Copyright (C) ...." notes from files that claim no copyright
  remove two leftover license lines from colors.{c,h}

3 weeks agoMerge branch 'fix-mkfds-foreign-sockets' of https://github.com/ChenQi1989/util-linux
Karel Zak [Mon, 9 Jun 2025 12:40:09 +0000 (14:40 +0200)] 
Merge branch 'fix-mkfds-foreign-sockets' of https://github.com/ChenQi1989/util-linux

* 'fix-mkfds-foreign-sockets' of https://github.com/ChenQi1989/util-linux:
  lsfd/mkfds-foreign-sockets: skip when lacking sock_diag ability

3 weeks 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>
3 weeks agots/kill/decode: use RTMIN from 'kill -L' instead of hardcoding 34
Chen Qi [Wed, 4 Jun 2025 08:27:19 +0000 (16:27 +0800)] 
ts/kill/decode: use RTMIN from 'kill -L' instead of hardcoding 34

glibc uses 34 as the value of SIGRTMIN:
https://sourceware.org/git/?p=glibc.git;a=blob;f=signal/allocrtsig.c;h=8ed8e37dd6c41f94be6eef042ce9db1af1153228;hb=HEAD#l27 """
static int current_rtmin = __SIGRTMIN + RESERVED_SIGRT; """

musl uses 35 as the value of SIGRTMIN:
https://git.musl-libc.org/cgit/musl/tree/src/signal/sigrtmin.c

With the hardcoded 34, test case fails with the following difference:

-Ignored: HUP QUIT TRAP PIPE ALRM
+Ignored: HUP QUIT TRAP PIPE ALRM 34

Extract the value of RTMIN from 'kill -L' to avoid such hardcoding.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
3 weeks agoMerge branch 'nsenter-man' of https://github.com/mjoerg/util-linux
Karel Zak [Fri, 6 Jun 2025 09:37:27 +0000 (11:37 +0200)] 
Merge branch 'nsenter-man' of https://github.com/mjoerg/util-linux

* 'nsenter-man' of https://github.com/mjoerg/util-linux:
  nsenter: (man) improve descriptions for some options

3 weeks agoMerge branch 'lsclocks/doc' of https://github.com/t-8ch/util-linux
Karel Zak [Fri, 6 Jun 2025 09:36:49 +0000 (11:36 +0200)] 
Merge branch 'lsclocks/doc' of https://github.com/t-8ch/util-linux

* 'lsclocks/doc' of https://github.com/t-8ch/util-linux:
  lsclocks: (man) list supported clock types

3 weeks agoMerge branch 'bash-completion-command-lsblk' of https://github.com/akinomyoga/util...
Karel Zak [Fri, 6 Jun 2025 09:36:14 +0000 (11:36 +0200)] 
Merge branch 'bash-completion-command-lsblk' of https://github.com/akinomyoga/util-linux

* 'bash-completion-command-lsblk' of https://github.com/akinomyoga/util-linux:
  bash-completion: use "command ls" instead of "\ls"
  bash-completion: prefix "command" to other external commands
  bash-completion: prefer "builtin cd" to "cd" to avoid aliases
  bash-completion: prefer "command lsblk" to "lsblk" to avoid aliases

3 weeks agotreewide: replace postal address in license specifier with a terse URL
Benno Schulenberg [Mon, 2 Jun 2025 14:14:36 +0000 (16:14 +0200)] 
treewide: replace postal address in license specifier with a terse URL

This brings the license specifier into the internet age.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
3 weeks agodocs: stop the copyright verbiage from getting included in the POT file
Benno Schulenberg [Mon, 2 Jun 2025 14:14:35 +0000 (16:14 +0200)] 
docs: stop the copyright verbiage from getting included in the POT file

For some reason the asciidoc parser from `po4a` includes *all* comments
from an adoc file into the util-linux-man.pot file.  Xgettext had a way
to include only certain comments, but `po4a` does not appear to have a
dedicated mechanism for this.

So... use some bricolage: insert a fruitless 'ifdef' as a barrier
between the copyright/license comment and the title line.  This
prevents `po4a` from seeing the two things as belonging together.

This shrinks the util-linux-man.pot file by 1267 lines (2.5%),
equivalent to nearly 67kB (4.8%).

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
3 weeks agodocs: make the "po4a:" line the first line, like in all other .adoc files
Benno Schulenberg [Mon, 2 Jun 2025 14:14:34 +0000 (16:14 +0200)] 
docs: make the "po4a:" line the first line, like in all other .adoc files

Also, there should be no space before "po4a:" for the line to be valid.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
3 weeks 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>
3 weeks 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>
3 weeks 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>
3 weeks agonsenter: (man) improve descriptions for some options
Martin Joerg [Thu, 5 Jun 2025 11:13:55 +0000 (11:13 +0000)] 
nsenter: (man) improve descriptions for some options

Signed-off-by: Martin Joerg <martin.joerg@gmail.com>
3 weeks agolsclocks: (man) list supported clock types
Thomas Weißschuh [Tue, 3 Jun 2025 16:05:30 +0000 (18:05 +0200)] 
lsclocks: (man) list supported clock types

Document the different types of clocks that are supported by lsclocks(1).

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
3 weeks agobash-completion: use "command ls" instead of "\ls"
Koichi Murase [Tue, 3 Jun 2025 13:08:04 +0000 (22:08 +0900)] 
bash-completion: use "command ls" instead of "\ls"

The backslash quoting can be used to bypass aliases, but it cannot be
used to bypass shell functions for interactive uses defined by the
users.  We can use "command ls" instead to bypass both aliases and
shell functions.

3 weeks agobash-completion: prefix "command" to other external commands
Koichi Murase [Tue, 3 Jun 2025 12:50:22 +0000 (21:50 +0900)] 
bash-completion: prefix "command" to other external commands

3 weeks agobash-completion: prefer "builtin cd" to "cd" to avoid aliases
Koichi Murase [Tue, 3 Jun 2025 10:29:06 +0000 (19:29 +0900)] 
bash-completion: prefer "builtin cd" to "cd" to avoid aliases

The command "cd" is also often aliased, so we should use "builtin cd"
to make sure to use the built-in version of "cd".

4 weeks agoMerge branch 'cachestat' of https://github.com/teknoraver/util-linux
Karel Zak [Mon, 2 Jun 2025 12:03:55 +0000 (14:03 +0200)] 
Merge branch 'cachestat' of https://github.com/teknoraver/util-linux

* 'cachestat' of https://github.com/teknoraver/util-linux:
  add option to force cachestat() usage

4 weeks agoMerge branch 'PR/Benno-28May' of https://github.com/karelzak/util-linux-work
Karel Zak [Mon, 2 Jun 2025 12:03:32 +0000 (14:03 +0200)] 
Merge branch 'PR/Benno-28May' of https://github.com/karelzak/util-linux-work

* 'PR/Benno-28May' of https://github.com/karelzak/util-linux-work:
  textual: harmonize the wording of the error message for an invalid PID
  colrm: make two error messages actually say that something is wrong
  lib/strutils: call gettext() only when argument of --hyperlink is invalid
  lib/colors: call gettext() only when the argument of --color is invalid

4 weeks agoMerge branch 'existing' of https://github.com/teknoraver/util-linux
Karel Zak [Mon, 2 Jun 2025 11:50:00 +0000 (13:50 +0200)] 
Merge branch 'existing' of https://github.com/teknoraver/util-linux

* 'existing' of https://github.com/teknoraver/util-linux:
  fix typo: exciting -> existing

4 weeks agobash-completion: prefer "command lsblk" to "lsblk" to avoid aliases
Koichi Murase [Sun, 1 Jun 2025 20:14:52 +0000 (05:14 +0900)] 
bash-completion: prefer "command lsblk" to "lsblk" to avoid aliases

The user may define an alias lsblk to specify the default formatting,
such as -T, which would conflict with lsblk -r used in the Bash
completion settings. In the Bash completion settings, to prevent the
calls of lsblk -r ... from being replaced with lsblk -T -r ... and
failing, lsblk should be called using command lsblk.

4 weeks agolibblkid: Add scoutfs filesystem.
Auke Kok [Tue, 27 May 2025 19:34:43 +0000 (12:34 -0700)] 
libblkid: Add scoutfs filesystem.

The scoutfs filesystem is maintained out-of-tree, but current enough
that we want to submit it for inclusion in libblkid - there's a few
users out there that would benefit from being able to have lsblk aid in
diagnosing and identifying.

For more information about scoutfs, visit the github page here:
   https://github.com/versity/scoutfs

Test images are provided for both data and meta devices. These were
taken from validation samples.

The wiper is set to only wipe a minute part of the filesystem -
basically only the superblock. This is adequately destructive.

Signed-off-by: Auke Kok <auke.kok@versity.com>
4 weeks agofix typo: exciting -> existing
Matteo Croce [Fri, 23 May 2025 03:42:53 +0000 (05:42 +0200)] 
fix typo: exciting -> existing

4 weeks agoadd option to force cachestat() usage
Matteo Croce [Fri, 23 May 2025 01:59:36 +0000 (03:59 +0200)] 
add option to force cachestat() usage

When cachestat() is not available, mmap() and fincore() are used to get
cache statistics.
This fallback returns less data than cachestat, and potentially hides
read errors by reporting that the file is all mapped in memory:

$ fincore /usr/bin/java
fincore: failed to do cachestat: /usr/bin/java: Operation not permitted
  RES PAGES   SIZE FILE
 208K    13 198,1K /usr/bin/java
$ echo $?
0
$ sudo fincore /usr/bin/java
RES PAGES   SIZE FILE
 0B     0 198,1K /usr/bin/java

Add a --cachestat argument which forces cachestat usage and fails if
it's not available:

$ fincore -C /usr/bin/java
fincore: failed to do cachestat: /usr/bin/java: Operation not permitted
$ echo $?
1

Also, on huge files the fallback is very slow and memory consuming,
so this flag can be user to avoid doing it by mistake.

4 weeks agoMerge branch 'patch-1' of https://github.com/Zephkek/util-linux
Karel Zak [Thu, 29 May 2025 11:26:40 +0000 (13:26 +0200)] 
Merge branch 'patch-1' of https://github.com/Zephkek/util-linux

* 'patch-1' of https://github.com/Zephkek/util-linux:
  Update bufflen
  Update setpwnam.c

4 weeks agotextual: harmonize the wording of the error message for an invalid PID
Benno Schulenberg [Wed, 28 May 2025 09:37:04 +0000 (11:37 +0200)] 
textual: harmonize the wording of the error message for an invalid PID

Having four different forms for the same basic message is unneeded.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
4 weeks agocolrm: make two error messages actually say that something is wrong
Benno Schulenberg [Wed, 28 May 2025 09:37:03 +0000 (11:37 +0200)] 
colrm: make two error messages actually say that something is wrong

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
4 weeks agolib/strutils: call gettext() only when argument of --hyperlink is invalid
Benno Schulenberg [Wed, 28 May 2025 09:37:02 +0000 (11:37 +0200)] 
lib/strutils: call gettext() only when argument of --hyperlink is invalid

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
4 weeks agolib/colors: call gettext() only when the argument of --color is invalid
Benno Schulenberg [Wed, 28 May 2025 09:37:01 +0000 (11:37 +0200)] 
lib/colors: call gettext() only when the argument of --color is invalid

Instead of calling gettext() before starting to interpret the argument
of option -L/--color, call it only when it's needed: when the argument
is not recognized.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
4 weeks agoMerge branch 'PR/Benno-23May' of https://github.com/karelzak/util-linux-work
Karel Zak [Thu, 29 May 2025 10:02:53 +0000 (12:02 +0200)] 
Merge branch 'PR/Benno-23May' of https://github.com/karelzak/util-linux-work

* 'PR/Benno-23May' of https://github.com/karelzak/util-linux-work:
  hardlink: (man,usage) sort the options mostly alphabetically
  hardlink: (usage) improve the descriptions of three options
  hardlink: (usage) remove mistaken period from two option descriptions
  hexdump: (man) put a list item on a single line, to avoid a warning

4 weeks agoMerge branch 'PR/libmount-verity-deinit' of https://github.com/karelzak/util-linux...
Karel Zak [Thu, 29 May 2025 10:02:29 +0000 (12:02 +0200)] 
Merge branch 'PR/libmount-verity-deinit' of https://github.com/karelzak/util-linux-work

* 'PR/libmount-verity-deinit' of https://github.com/karelzak/util-linux-work:
  libmount: (verity) use messages API for important errors
  libmount: (verity) use messages API for dlopen errors
  libmount: (verity) fix compiler warning
  libmount: (verity) fix deinitialization

4 weeks agoMerge branch 'total' of https://github.com/teknoraver/util-linux
Karel Zak [Thu, 29 May 2025 10:02:09 +0000 (12:02 +0200)] 
Merge branch 'total' of https://github.com/teknoraver/util-linux

* 'total' of https://github.com/teknoraver/util-linux:
  fincore: add option to show a grand total

5 weeks agohardlink: (man,usage) sort the options mostly alphabetically
Benno Schulenberg [Fri, 23 May 2025 12:04:07 +0000 (14:04 +0200)] 
hardlink: (man,usage) sort the options mostly alphabetically

Also, improve some markup and wording and grammar.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
5 weeks agohardlink: (usage) improve the descriptions of three options
Benno Schulenberg [Fri, 23 May 2025 12:04:06 +0000 (14:04 +0200)] 
hardlink: (usage) improve the descriptions of three options

The first description was too wordy for a --help text, the second
was vague and seemed to imply that it should be combined with the
preceding option, and the third failed to mention that it doesn't
actually link anything.

(Note: the choice for -m for --maximize and -M for --minimize is
unfortunate, as most people would guess the opposite, especially
since -s is used for --minimum-size and -S for --maximum-size.)

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
5 weeks agohardlink: (usage) remove mistaken period from two option descriptions
Benno Schulenberg [Fri, 23 May 2025 12:04:05 +0000 (14:04 +0200)] 
hardlink: (usage) remove mistaken period from two option descriptions

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
5 weeks agohexdump: (man) put a list item on a single line, to avoid a warning
Benno Schulenberg [Fri, 23 May 2025 12:04:04 +0000 (14:04 +0200)] 
hexdump: (man) put a list item on a single line, to avoid a warning

Asciidoctor annoyingly warned for every translation that
unindented content was added to a list item.  Avoid this
by not breaking the list item into two lines.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
5 weeks agoAUTHORS: update Zhenwei Pi email
zhenwei pi [Mon, 26 May 2025 09:37:57 +0000 (17:37 +0800)] 
AUTHORS: update Zhenwei Pi email

I will be leaving ByteDance so updating my email in AUTHORS to my
personal email.

Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
5 weeks agolibmount: (verity) use messages API for important errors
Karel Zak [Mon, 26 May 2025 16:55:36 +0000 (18:55 +0200)] 
libmount: (verity) use messages API for important errors

Signed-off-by: Karel Zak <kzak@redhat.com>
5 weeks agolibmount: (verity) use messages API for dlopen errors
Karel Zak [Mon, 26 May 2025 16:44:08 +0000 (18:44 +0200)] 
libmount: (verity) use messages API for dlopen errors

Signed-off-by: Karel Zak <kzak@redhat.com>
5 weeks agolibmount: (verity) fix compiler warning
Karel Zak [Mon, 26 May 2025 15:58:48 +0000 (17:58 +0200)] 
libmount: (verity) fix compiler warning

libmount/src/hook_veritydev.c: In function 'setup_veritydev':
libmount/src/hook_veritydev.c:457:13: warning: '%s' directive argument is null [-Wformat-overflow=]

Signed-off-by: Karel Zak <kzak@redhat.com>
5 weeks agolibmount: (verity) fix deinitialization
Karel Zak [Mon, 26 May 2025 15:57:34 +0000 (17:57 +0200)] 
libmount: (verity) fix deinitialization

Fixes: https://github.com/util-linux/util-linux/issues/3592
Signed-off-by: Karel Zak <kzak@redhat.com>
5 weeks agoMerge branch 'master' of https://github.com/formtapez/util-linux
Karel Zak [Mon, 26 May 2025 09:58:31 +0000 (11:58 +0200)] 
Merge branch 'master' of https://github.com/formtapez/util-linux

* 'master' of https://github.com/formtapez/util-linux:
  fix sectors typos

5 weeks agoMerge branch 'PR/lsblk-pttype' of https://github.com/karelzak/util-linux-work
Karel Zak [Mon, 26 May 2025 09:32:49 +0000 (11:32 +0200)] 
Merge branch 'PR/lsblk-pttype' of https://github.com/karelzak/util-linux-work

* 'PR/lsblk-pttype' of https://github.com/karelzak/util-linux-work:
  lsblk: use ID_PART_ENTRY_SCHEME as fallback for PTTYPE

5 weeks agoMerge branch 'PR/AT_SECURE' of https://github.com/karelzak/util-linux-work
Karel Zak [Mon, 26 May 2025 09:32:25 +0000 (11:32 +0200)] 
Merge branch 'PR/AT_SECURE' of https://github.com/karelzak/util-linux-work

* 'PR/AT_SECURE' of https://github.com/karelzak/util-linux-work:
  treewide: improve getauxval(AT_SECURE) usage
  lib/env, ...: use getauxval(AT_SECURE) for SUID check

5 weeks agoUpdate bufflen
Mohamed Maatallah [Mon, 26 May 2025 09:06:02 +0000 (10:06 +0100)] 
Update bufflen

Update buflen

5 weeks agolsfd/mkfds-foreign-sockets: skip when lacking sock_diag ability
Chen Qi [Mon, 26 May 2025 07:24:16 +0000 (15:24 +0800)] 
lsfd/mkfds-foreign-sockets: skip when lacking sock_diag ability

The ENDPOINTS will need sock_diag ability. The kernel might not
enable related configs. Check and skip in case of lacking such ability.

Fixes: https://github.com/util-linux/util-linux/issues/3590
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
5 weeks agofix sectors typos
formtapez [Sat, 24 May 2025 21:39:04 +0000 (23:39 +0200)] 
fix sectors typos

5 weeks agofincore: add option to show a grand total
Matteo Croce [Thu, 22 May 2025 20:44:32 +0000 (22:44 +0200)] 
fincore: add option to show a grand total

Similarly to `du`, add a --total option to produce a grand total
of the files analyzed.

Signed-off-by: Matteo Croce <teknoraver@meta.com>
5 weeks agoUpdate setpwnam.c
Mohamed Maatallah [Sat, 24 May 2025 02:16:09 +0000 (03:16 +0100)] 
Update setpwnam.c

5 weeks agoMerge branch 'xry111/loongarch-isa-linux-6-12' of https://github.com/xry111/util...
Karel Zak [Thu, 22 May 2025 08:21:42 +0000 (10:21 +0200)] 
Merge branch 'xry111/loongarch-isa-linux-6-12' of https://github.com/xry111/util-linux

* 'xry111/loongarch-isa-linux-6-12' of https://github.com/xry111/util-linux:
  lscpu: Fix loongarch op-mode output with recent kernel

5 weeks 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>
5 weeks 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>
5 weeks agouuidgen.1.adoc: remove superfluous 'plus'
Daniel Lublin [Wed, 21 May 2025 09:20:34 +0000 (11:20 +0200)] 
uuidgen.1.adoc: remove superfluous 'plus'

Likely copy-paste mistake from the --time flag

5 weeks agoMerge branch 'login_fix' of https://github.com/echoechoin/util-linux
Karel Zak [Wed, 21 May 2025 09:05:38 +0000 (11:05 +0200)] 
Merge branch 'login_fix' of https://github.com/echoechoin/util-linux

* 'login_fix' of https://github.com/echoechoin/util-linux:
  login: (adoc) add a description about LOGIN_SHELL_FALLBACK
  login: using an avaiable shell while logging in.

5 weeks agofincore: add recursive directory scanning
Matteo Croce [Sat, 19 Apr 2025 01:09:25 +0000 (03:09 +0200)] 
fincore: add recursive directory scanning

Add a --recursive flag to fincore which allows to recursively scan
directories.

Co-authored-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Matteo Croce <teknoraver@meta.com>
5 weeks agologin: (adoc) add a description about LOGIN_SHELL_FALLBACK
WanBingjiang [Wed, 21 May 2025 01:49:33 +0000 (09:49 +0800)] 
login: (adoc) add a description about LOGIN_SHELL_FALLBACK

5 weeks agotreewide: improve getauxval(AT_SECURE) usage
Karel Zak [Tue, 20 May 2025 18:08:09 +0000 (20:08 +0200)] 
treewide: improve getauxval(AT_SECURE) usage

Let's enhance portability and readability slightly.

Signed-off-by: Karel Zak <kzak@redhat.com>
5 weeks agoMerge branch 'at_secure' of https://github.com/MaxKellermann/util-linux into PR/AT_SECURE
Karel Zak [Tue, 20 May 2025 17:49:13 +0000 (19:49 +0200)] 
Merge branch 'at_secure' of https://github.com/MaxKellermann/util-linux into PR/AT_SECURE

* 'at_secure' of https://github.com/MaxKellermann/util-linux:
  lib/env, ...: use getauxval(AT_SECURE) for SUID check

5 weeks 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>