Util-Linux package development
 help / color / mirror / Atom feed
* Re: [PATCH] chmem: Remove commit - chmem print warnings about failures always
From: Karel Zak @ 2025-08-26  9:30 UTC (permalink / raw)
  To: Sumanth Korikkar; +Cc: util-linux, Gerald Schaefer
In-Reply-To: <20250822151353.508175-1-sumanthk@linux.ibm.com>

On Fri, Aug 22, 2025 at 05:13:53PM +0200, Sumanth Korikkar wrote:
>  sys-utils/chmem.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

Applied, thanks.

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com


^ permalink raw reply

* [PATCH] lscpu: Add NVIDIA Olympus arm64 core
From: Matthew R. Ochs @ 2025-09-02 20:28 UTC (permalink / raw)
  To: util-linux

Add an entry for NVIDIA Olympus arm64 core.

Signed-off-by: Matthew R. Ochs <mochs@nvidia.com>
---
 sys-utils/lscpu-arm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys-utils/lscpu-arm.c b/sys-utils/lscpu-arm.c
index 8745599d4c99..9596691fd4c2 100644
--- a/sys-utils/lscpu-arm.c
+++ b/sys-utils/lscpu-arm.c
@@ -171,6 +171,7 @@ static const struct id_part nvidia_part[] = {
     { 0x000, "Denver" },
     { 0x003, "Denver 2" },
     { 0x004, "Carmel" },
+    { 0x010, "Olympus" },
     { -1, "unknown" },
 };
 
-- 
2.46.0


^ permalink raw reply related

* Re: [PATCH] lscpu: Add NVIDIA Olympus arm64 core
From: Karel Zak @ 2025-09-08 10:02 UTC (permalink / raw)
  To: Matthew R. Ochs; +Cc: util-linux
In-Reply-To: <20250902202837.831543-1-mochs@nvidia.com>

On Tue, Sep 02, 2025 at 01:28:36PM -0700, Matthew R. Ochs wrote:
>  sys-utils/lscpu-arm.c | 1 +
>  1 file changed, 1 insertion(+)

Applied, thanks.

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com


^ permalink raw reply

* [PATCH] sfdisk: (man) do not use the common 'include' for --help and --version
From: Benno Schulenberg @ 2025-09-09  8:56 UTC (permalink / raw)
  To: util-linux; +Cc: Mario Blättermann

Anomalously, `sfdisk` uses -v for --version instead of the standard
uppercase -V.  In `sfdisk` -V means --verify.

This reverts commit 82d0bfe59a from last week.

CC: Mario Blättermann <mario.blaettermann@gmail.com>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
 disk-utils/sfdisk.8.adoc | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/disk-utils/sfdisk.8.adoc b/disk-utils/sfdisk.8.adoc
index 01bcfbfff..99849a638 100644
--- a/disk-utils/sfdisk.8.adoc
+++ b/disk-utils/sfdisk.8.adoc
@@ -239,7 +239,11 @@ Wipe filesystem, RAID and partition-table signatures from the device, in order t
 *-W*, *--wipe-partitions* _when_::
 Wipe filesystem, RAID and partition-table signatures from a newly created partition, in order to avoid possible collisions. The argument _when_ can be *auto*, *never* or *always*. When this option is not given, the default is *auto*, in which case signatures are wiped only when in interactive mode and after confirmation by user. In all cases detected signatures are reported by warning messages after a new partition is created. See also *wipefs*(8) command.
 
-include::man-common/help-version.adoc[]
+*-h*, *--help*::
+Display help text and exit.
+
+*-v*, *--version*::
+Display version and exit.
 
 == INPUT FORMATS
 
-- 
2.51.0


^ permalink raw reply related

* Re: [PATCH] sfdisk: (man) do not use the common 'include' for --help and --version
From: Karel Zak @ 2025-09-09 10:48 UTC (permalink / raw)
  To: Benno Schulenberg; +Cc: util-linux, Mario Blättermann
In-Reply-To: <20250909085609.5049-1-bensberg@telfort.nl>

On Tue, Sep 09, 2025 at 10:56:09AM +0200, Benno Schulenberg wrote:
> Anomalously, `sfdisk` uses -v for --version instead of the standard
> uppercase -V.  In `sfdisk` -V means --verify.
> 
> This reverts commit 82d0bfe59a from last week.
> 
> CC: Mario Blättermann <mario.blaettermann@gmail.com>
> Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
> ---
>  disk-utils/sfdisk.8.adoc | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/disk-utils/sfdisk.8.adoc b/disk-utils/sfdisk.8.adoc
> index 01bcfbfff..99849a638 100644
> --- a/disk-utils/sfdisk.8.adoc
> +++ b/disk-utils/sfdisk.8.adoc
> @@ -239,7 +239,11 @@ Wipe filesystem, RAID and partition-table signatures from the device, in order t
>  *-W*, *--wipe-partitions* _when_::
>  Wipe filesystem, RAID and partition-table signatures from a newly created partition, in order to avoid possible collisions. The argument _when_ can be *auto*, *never* or *always*. When this option is not given, the default is *auto*, in which case signatures are wiped only when in interactive mode and after confirmation by user. In all cases detected signatures are reported by warning messages after a new partition is created. See also *wipefs*(8) command.
>  
> -include::man-common/help-version.adoc[]

It would be helpful to add a comment there to prevent this mistake in
the future, such as:

// Do not use man-common/help-version.adoc; -V is incompatible.

> +*-h*, *--help*::
> +Display help text and exit.
> +
> +*-v*, *--version*::
> +Display version and exit.

Benno, can you update the patch? Thanks.

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com


^ permalink raw reply

* plan for stable v2.41.2 release
From: Karel Zak @ 2025-09-09 11:02 UTC (permalink / raw)
  To: util-linux

Hi all,

I plan to release v2.41.2, a stable maintenance release, next week.
The stable/v2.41 branch has been updated with relevant commits.
Suggestions and pull requests are welcome.

I may prepare v2.41.2-rc1 for translators this Friday. We usually
don’t do -rc builds for stable updates, but if there is demand from
translators, I can provide one.

Note that the large changes to the man pages (formatting, etc.) are
not included, as I’m not sure we can easily backport everything, and
it would also break translations.

The current log is below.

  Karel


autotools:
    - don't use wide-character ncurses if --disable-widechar (by Karel Zak)

bash-completion:
    - fix function name of enosys completion (by Koichi Murase)
    - add choom and coresched (by Karel Zak)

build-sys:
    - update release dates (by Karel Zak)

cfdisk:
    - fix memory leak and possible NULL dereference [gcc-analyzer] (by Karel Zak)

column:
    - fix compiler warning for non-widechar compilation (by Karel Zak)

docs:
    - add v2.41.1-ReleaseNotes (by Karel Zak)

fdformat:
    - use size_t and ssize_t (by Karel Zak)

fdisk:
    - fix possible memory leak (by Karel Zak)

fdisk,partx:
    - avoid strcasecmp() for ASCII-only strings (by Karel Zak)

findmnt:
    - add missing newline in --raw, --pair and --list output formats (by Christian Goeschel Ndjomouo)
    - fix -k option parsing regression (by Karel Zak)

fsck.cramfs:
    - check buffer size for memcpy() (by Karel Zak)

getopt:
    - document special symbols that should not be used as option characters (by cgoesche)

gitignore:
    - Ignore tests/diff/ and test/output/ (by Jesse Rosenstock)

hardlink:
    - (man) add note note about ULFILEEQ_DEBUG= (by Karel Zak)
    - define more function as inline (by Karel Zak)
    - fix performance regression (inefficient signal evaluation) (by Karel Zak)
    - Use macro for verbose output (by Karel Zak)

include/cctype:
    - fix string comparison (by Karel Zak)

include/mount-api-utils:
    - avoid using sys/mount.h (by Karel Zak)
    - include linux/unistd.h (by Thomas Weißschuh)

ldattach:
    - add ifndef BOTHER (by Karel Zak)

libblkid:
    - (ext) reduce false positive (by 胡玮文)
    - improve UUID_SUB= description (by Karel Zak)
    - Fix crash while parsing config with libeconf (by Stanislav Brabec)
    - befs fix underflow (by Milan Broz)
    - avoid strcasecmp() for ASCII-only strings (by Karel Zak)

libblkid/src/topology/dm:
    - fix fscanf return value check to match expected number of parsed items (by Mingjie Shen)

lib/color-names:
    - fix stupid bugs (by Karel Zak)
    - Fix color name canonicalization (by Karel Zak)

libfdisk:
    - (script) improve separator usage in named-fields dump (by Karel Zak)
    - (script) fix device name separator parsing (by Karel Zak)
    - avoid strcasecmp() for ASCII-only strings (by Karel Zak)

liblastlog2:
    - markup fixes for man pages (by Mario Blättermann)

libmount:
    - (subdir) restrict for real mounts only (by Karel Zak)
    - (subdir) remove unused code (by Karel Zak)
    - avoid calling memset() unnecessarily (by Karel Zak)
    - avoid strcasecmp() for ASCII-only strings (by Karel Zak)
    - fix --no-canonicalize regression (by Karel Zak)

lib/path:
    - avoid double free() for cpusets (by Karel Zak)

lib/strutils:
    - add ul_ prefix to strrep() and strrem() functions (by Karel Zak)
    - add ul_ prefix to split() function (by Karel Zak)
    - add ul_ prefix to strappend() functions (by Karel Zak)
    - add ul_ prefix to strconcat() functions (by Karel Zak)
    - add ul_ prefix to startswith() and endswith() (by Karel Zak)

lib/strv:
    - use ul_ prefix for strv functions (by Karel Zak)

libuuid:
    - fix uuid_time on macOS without attribute((alias)) (by Eugene Gershnik)

logger:
    - fix incorrect warning message when both --file and a message are specified (by Alexander Kappner)

lsblk:
    - fix possible use-after-free (by Karel Zak)
    - fix memory leak [coverity scan] (by Karel Zak)
    - use md as fallback TYPE when md/level empty (by codefiles)
    - use ID_PART_ENTRY_SCHEME as fallback for PTTYPE (by Karel Zak)
    - avoid strcasecmp() for ASCII-only strings (by Karel Zak)

lscpu:
    - Add NVIDIA Olympus arm64 core (by Matthew R. Ochs)
    - fix possible buffer overflow in cpuinfo parser (by Karel Zak)
    - Fix loongarch op-mode output with recent kernel (by Xi Ruoyao)

lsfd:
    - (bug fix) scan the protocol field of /proc/net/packet as a hex number (by Masatake YAMATO)
    - fix the description for PACKET.PROTOCOL column (by Masatake YAMATO)

lsns:
    - enhance compilation without USE_NS_GET_API (by Karel Zak)
    - fix undefined reference to add_namespace_for_nsfd #3483 (by Thomas Devoogdt)

man:
    - Fixed incorrect ipcrm options (by Prasanna Paithankar)
    - Replace RETURN VALUE with EXIT STATUS in section 1 (by Jesse Rosenstock)

meson:
    - add feature for translated documentation (by Thomas Weißschuh)
    - remove tinfo dependency from 'more' (by Thomas Weißschuh)
    - fix manadocs for libsmartcols and libblkid (by Karel Zak)
    - fix po-man installation (by Karel Zak)

misc:
    - never include wchar.h (by Karel Zak)

mkfs.cramfs:
    - avoid uninitialized value [coverity scan] (by Karel Zak)

more:
    - temporarily ignore stdin when waiting for stderr (by Karel Zak)
    - fix broken ':!command' command key (by cgoesche)
    - fix implicit previous shell_line execution #3508 (by cgoesche)

mount:
    - (man) add missing word (by Jakub Wilk)

namespace.h:
    - fix compilation on Linux < 4.10 (by Thomas Devoogdt)

rev:
    - add --zero option to --help output (by Christian Goeschel Ndjomouo)

setpriv:
    - Improve getgroups() Portability (by Karel Zak)

sfdisk:
    - reject spurious arguments for --reorder/--backup-pt-sectors (by Thomas Weißschuh)

tests:
    - add color names test (by Karel Zak)
    - (test_mkfds::mapped-packet-socket) add a new parameter, protocol (by Masatake YAMATO)

tests/helpers/test_sigstate.c:
    - explicitly reset SIGINT to default action after trapping (by Hongxu Jia)

treewide:
    - add ul_ to parse_timestamp() function name (by Karel Zak)
    - add ul_ to parse_switch() function name (by Stanislav Brabec)
    - add ul_ to parse_size() function name (by Karel Zak)
    - add ul_ to parse_range() function name (by Karel Zak)
    - fix optional arguments usage (by Karel Zak)
    - avoid strcasecmp() for ASCII-only strings (by Karel Zak)

Wipefs:
    - improve --all descriptions for whole-disks (by Karel Zak)

zramctl:
    - ignore ENOENT when setting max_comp_streams (by Jiang XueQian)
    - fix MEM-USED column description (by Jérôme Poulin)

Misc:
    - Add missing ;; to -m case (#1) (by Nate Drake)
    - Do not call exit() on code ending in shared libraries (by Cristian Rodríguez)
    - remove two leftover license lines from colors.{c,h} (by Benno Schulenberg)
    - remove "Copyright (C) ...." notes from files that claim no copyright (by Benno Schulenberg)
    - correct the full name of the GPL in various files (by Benno Schulenberg)
    - Make scols_column_set_data_func docs visible (by FeRD (Frank Dana))
    - Do not use strerror on shared libraries (by Cristian Rodríguez)
    - Fix typo in blkdiscard docs (by pls-no-hack)
    - lib/fileeq.c Fix a typo in message. (by Masanari Iida)


^ permalink raw reply

* [PATCH V2] sfdisk: (man) do not use the common 'include' for --help and --version
From: Benno Schulenberg @ 2025-09-09 15:12 UTC (permalink / raw)
  To: util-linux; +Cc: Mario Blättermann

Anomalously, `sfdisk` uses -v for --version instead of the standard
uppercase -V.  In `sfdisk` -V means --verify.

This effectively reverts commit 82d0bfe59a from last week, and
adds a comment to try and prevent the mistake in the future.

CC: Mario Blättermann <mario.blaettermann@gmail.com>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
 disk-utils/sfdisk.8.adoc | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/disk-utils/sfdisk.8.adoc b/disk-utils/sfdisk.8.adoc
index 01bcfbfff..7d5db422e 100644
--- a/disk-utils/sfdisk.8.adoc
+++ b/disk-utils/sfdisk.8.adoc
@@ -239,7 +239,13 @@ Wipe filesystem, RAID and partition-table signatures from the device, in order t
 *-W*, *--wipe-partitions* _when_::
 Wipe filesystem, RAID and partition-table signatures from a newly created partition, in order to avoid possible collisions. The argument _when_ can be *auto*, *never* or *always*. When this option is not given, the default is *auto*, in which case signatures are wiped only when in interactive mode and after confirmation by user. In all cases detected signatures are reported by warning messages after a new partition is created. See also *wipefs*(8) command.
 
-include::man-common/help-version.adoc[]
+*-h*, *--help*::
+Display help text and exit.
+
+*-v*, *--version*::
+Display version and exit.
+
+// Do not include::man-common/help-version.adoc[], as -V is not --version.
 
 == INPUT FORMATS
 
-- 
2.51.0


^ permalink raw reply related

* Re: [PATCH V2] sfdisk: (man) do not use the common 'include' for --help and --version
From: Karel Zak @ 2025-09-10  8:40 UTC (permalink / raw)
  To: Benno Schulenberg; +Cc: util-linux, Mario Blättermann
In-Reply-To: <20250909151208.81179-1-bensberg@telfort.nl>

On Tue, Sep 09, 2025 at 05:12:08PM +0200, Benno Schulenberg wrote:
>  disk-utils/sfdisk.8.adoc | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)

Applied, thanks!

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com


^ permalink raw reply

* [ANNOUNCE] util-linux v2.41.2-rc1
From: Karel Zak @ 2025-09-11  9:34 UTC (permalink / raw)
  To: util-linux


The util-linux stable release v2.41.2-rc1 is now available at
 
  http://www.kernel.org/pub/linux/utils/util-linux/v2.41.2
 
Feedback and bug reports, as always, are welcomed.
 
The final v2.41.2 release will be next week.

  Karel


util-linux 2.41.2 Release Notes
===============================

bash-completion:
    - fix function name of enosys completion (by Koichi Murase)
    - add choom and coresched (by Karel Zak)

findmnt:
    - add missing newline in --raw, --pair and --list output formats (by Christian Goeschel Ndjomouo)

fsck.cramfs:
    - check buffer size for memcpy() (by Karel Zak)

getopt:
    - document special symbols that should not be used as option characters (by cgoesche)

gitignore:
    - Ignore tests/diff/ and test/output/ (by Jesse Rosenstock)

hardlink:
    - (man) add note note about ULFILEEQ_DEBUG= (by Karel Zak)

include/mount-api-utils:
    - avoid using sys/mount.h (by Karel Zak)

libblkid:
    - (ext) reduce false positive (by 胡玮文)
    - improve UUID_SUB= description (by Karel Zak)

lib/color-names:
    - fix stupid bugs (by Karel Zak)
    - Fix color name canonicalization (by Karel Zak)

libfdisk:
    - (script) improve separator usage in named-fields dump (by Karel Zak)
    - (script) fix device name separator parsing (by Karel Zak)

liblastlog2:
    - markup fixes for man pages (by Mario Blättermann)

libmount:
    - don't report fsconfig errors with "nofail" (by Karel Zak)

lib/path:
    - avoid double free() for cpusets (by Karel Zak)

lib/strutils:
    - add ul_ prefix to strrep() and strrem() functions (by Karel Zak)
    - add ul_ prefix to split() function (by Karel Zak)
    - add ul_ prefix to strappend() functions (by Karel Zak)
    - add ul_ prefix to strconcat() functions (by Karel Zak)
    - add ul_ prefix to startswith() and endswith() (by Karel Zak)

lib/strv:
    - use ul_ prefix for strv functions (by Karel Zak)

logger:
    - fix buffer overflow when read stdin (by Karel Zak)
    - fix incorrect warning message when both --file and a message are specified (by Alexander Kappner)

lsblk:
    - fix possible use-after-free (by Karel Zak)
    - fix memory leak [coverity scan] (by Karel Zak)
    - use md as fallback TYPE when md/level empty (by codefiles)

lscpu:
    - New Arm C1 parts (by Jeremy Linton)
    - Add NVIDIA Olympus arm64 core (by Matthew R. Ochs)

man:
    - Fixed incorrect ipcrm options (by Prasanna Paithankar)
    - Replace RETURN VALUE with EXIT STATUS in section 1 (by Jesse Rosenstock)

mkfs.cramfs:
    - avoid uninitialized value [coverity scan] (by Karel Zak)

more:
    - temporarily ignore stdin when waiting for stderr (by Karel Zak)

po-man:
    - merge changes (by Karel Zak)
    - update es.po (from translationproject.org) (by Antonio Ceballos Roa)

rev:
    - add --zero option to --help output (by Christian Goeschel Ndjomouo)

setpriv:
    - Improve getgroups() Portability (by Karel Zak)

sfdisk:
    - reject spurious arguments for --reorder/--backup-pt-sectors (by Thomas Weißschuh)

tests:
    - add color names test (by Karel Zak)

tests/helpers/test_sigstate.c:
    - explicitly reset SIGINT to default action after trapping (by Hongxu Jia)

zramctl:
    - ignore ENOENT when setting max_comp_streams (by Jiang XueQian)
    - fix MEM-USED column description (by Jérôme Poulin)

Misc:
    - Add missing ;; to -m case (#1) (by Nate Drake)


-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com


^ permalink raw reply

* [PATCH] findmnt: (usage) add a needed equals sign before an optional argument
From: Benno Schulenberg @ 2025-09-11 13:48 UTC (permalink / raw)
  To: util-linux

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

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

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
 misc-utils/findmnt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/misc-utils/findmnt.c b/misc-utils/findmnt.c
index 463537e69..83989c10e 100644
--- a/misc-utils/findmnt.c
+++ b/misc-utils/findmnt.c
@@ -1533,8 +1533,8 @@ static void __attribute__((__noreturn__)) usage(void)
 	fputs(_(" -F, --tab-file <path>  alternative file for -s, -m or -k options\n"), out);
 	fputs(_(" -m, --mtab             search in table of mounted filesystems\n"
 		"                          (includes user space mount options)\n"), out);
-	fputs(_(" -k                     alias to '--kernel mountinfo'\n"), out);
-	fputs(_(" --kernel[=<method>]    search in kernel mount table (default)\n"
+	fputs(_(" -k                     an alias for '--kernel=mountinfo'\n"), out);
+	fputs(_(" --kernel[=<method>]    search in kernel mount table (default behavior);\n"
 		"                          <method> is mountinfo or listmount\n"), out);
 	fputs(_(" -N, --task <tid>       use alternative namespace (/proc/<tid>/mountinfo file)\n"), out);
 	fputs(_(" -p, --poll[=<list>]    monitor changes in table of mounted filesystems\n"), out);
-- 
2.51.0


^ permalink raw reply related

* Re: [PATCH] findmnt: (usage) add a needed equals sign before an optional argument
From: Benno Schulenberg @ 2025-09-11 13:51 UTC (permalink / raw)
  To: util-linux; +Cc: Karel Zak
In-Reply-To: <20250911134807.12903-1-bensberg@telfort.nl>


[-- Attachment #1.1: Type: text/plain, Size: 500 bytes --]


Op 11-09-2025 om 15:48 schreef Benno Schulenberg:
> -	fputs(_(" -k                     alias to '--kernel mountinfo'\n"), out);
> -	fputs(_(" --kernel[=<method>]    search in kernel mount table (default)\n"
> +	fputs(_(" -k                     an alias for '--kernel=mountinfo'\n"), out);
> +	fputs(_(" --kernel[=<method>]    search in kernel mount table (default behavior);\n"

Karel, do you want to roll an rc2, or shall I just make these changes in
rc1 POT file for the TP?


Benno


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

^ permalink raw reply

* Re: [PATCH] findmnt: (usage) add a needed equals sign before an optional argument
From: Karel Zak @ 2025-09-12 13:18 UTC (permalink / raw)
  To: Benno Schulenberg; +Cc: util-linux
In-Reply-To: <47103376-a043-4f78-8213-ba06f52f5116@telfort.nl>

On Thu, Sep 11, 2025 at 03:51:48PM +0200, Benno Schulenberg wrote:
> 
> Op 11-09-2025 om 15:48 schreef Benno Schulenberg:
> > -	fputs(_(" -k                     alias to '--kernel mountinfo'\n"), out);
> > -	fputs(_(" --kernel[=<method>]    search in kernel mount table (default)\n"
> > +	fputs(_(" -k                     an alias for '--kernel=mountinfo'\n"), out);
> > +	fputs(_(" --kernel[=<method>]    search in kernel mount table (default behavior);\n"
> 
> Karel, do you want to roll an rc2, or shall I just make these changes in
> rc1 POT file for the TP?

I think RC1 is sufficient for translations for stable releases; we
don’t need as long a stabilization period as for major releases.
That’s why I asked for an update on TP.

Or do you think including stable release updates on TP is overkill?

We haven’t done this in recent years, but the number of translated
strings is growing, so updating more often might be better, and x.y.2
releases are usually the last for the branch.

I’m open to advices; I don’t have a strong opinion on this.

    Karel


-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com


^ permalink raw reply

* Re: [PATCH] findmnt: (usage) add a needed equals sign before an optional argument
From: Benno Schulenberg @ 2025-09-12 14:47 UTC (permalink / raw)
  To: Karel Zak; +Cc: util-linux
In-Reply-To: <rs4jch6hxbont2e56cnshc37hzefhprhlljy2v56xhhtjkfdbm@kgf6bctiicox>


[-- Attachment #1.1: Type: text/plain, Size: 1279 bytes --]


Op 12-09-2025 om 15:18 schreef Karel Zak:
> On Thu, Sep 11, 2025 at 03:51:48PM +0200, Benno Schulenberg wrote:
>>
>> Op 11-09-2025 om 15:48 schreef Benno Schulenberg:
>>> -	fputs(_(" -k                     alias to '--kernel mountinfo'\n"), out);
>>> -	fputs(_(" --kernel[=<method>]    search in kernel mount table (default)\n"
>>> +	fputs(_(" -k                     an alias for '--kernel=mountinfo'\n"), out);
>>> +	fputs(_(" --kernel[=<method>]    search in kernel mount table (default behavior);\n"
>>
>> Karel, do you want to roll an rc2, or shall I just make these changes in
>> rc1 POT file for the TP?
> 
> I think RC1 is sufficient for translations for stable releases; we
> don’t need as long a stabilization period as for major releases.
> That’s why I asked for an update on TP.
> 
> Or do you think including stable release updates on TP is overkill?

No -- offering stable dot releases for translation is fine,
as long as the string changes are the same as made in master.

What I'm asking is: will you apply the patch (both to master
and to the stable branch)?  If yes, then I'll edit the rc1 POT
file to correspond with those changes.  (I don't want to offer
a faulty string and then see it corrected in the next POT.)


Benno


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

^ permalink raw reply

* Security issue : 2021 commit to libblkid breaks existing string sanitization
From: Richard Aplin @ 2025-09-13  1:33 UTC (permalink / raw)
  To: util-linux

Hi.  Apologies if my list etiquette is bad, I am noob here.

There was a 2021 commit to libblkid,
https://github.com/util-linux/util-linux/commit/6db368598962ea8b0329ae148ab878fd458f2533
commit label "Optimize the blkid_safe_string() function"

This is potentially an unsafe change and may allow shell command injection.

1. The shell command blkid has a mode "-o udev" which was designed to
output information about block devices in a LABEL=VALUE format for
consumption by shell scripts.  I have seen more than one instance (I
am looking at one now in a commercial product) where userspace script
has done:
eval $(blkid -o udev ...)

2. One of the fields returned by blkid (e.g. for a USB stick) is the
volume label, which would be controllable by an attacker inserting a
USB stick.
The blkid 'udev' command code is aware of this danger and sanitizes
the volume label and other attacker-controllable strings by calling
the function
blkid_safe_string(...)
in libblkid.
Here is the blkid code that attempts to sanitize this string, calling libblkid :
https://github.com/util-linux/util-linux/blob/b1f8b5740d81d813a2ea9ae1db8f059e5bee3b60/misc-utils/blkid.c#L280

3. In previous versions of libblkid the blkid_safe_string function
used to strip several dangerous ascii characters that would have
allowed command injection (specifically; backtick, parenthesis, etc.
It still allowed '$' which is a little dubious).

The commit 6db3685 I linked to above, dating from 2021 (which was
accepted) rewrites the ..safe_string function and now allows all
printable ascii chars from 32-127, including all shell-dangerous
characters; essentially blkid_safe_string is much less safe - in fact
downright dangerous if the "-o udev" mode output of blkid is evaluated
in a shell.

Proof of concept:
1. Format a removable USB stick (e.g. /dev/sdc1) with a VFAT volume
label e.g. "$(reboot)"
2. Run the commit listed above: "blkid -o udev -p /dev/sdc1"
3. Observe that the output of blkid has not stripped dangerous
characters and includes the line ID_FS_LABEL=$(reboot)
4. If you want to feed that output into eval or run it as a bash
script, be my guest.
5. This behavior did not happen prior to commit
6db368598962ea8b0329ae148ab878fd458f2533 -  the blkid output would be
ID_FS_LABEL=$_reboot_ this is still not ideal (the '$' was preserved
so it looks for an environment variable which can be abused to leak
information etc, ...but at least would not result in command
execution.

I suggest this commit be removed because in simple terms the
"blkid_safe_string" is now much less safe (depending on the threat
model).

Thanks,
Richard Aplin

^ permalink raw reply

* Re: [PATCH] findmnt: (usage) add a needed equals sign before an optional argument
From: Karel Zak @ 2025-09-15  9:22 UTC (permalink / raw)
  To: Benno Schulenberg; +Cc: util-linux
In-Reply-To: <14fbf910-bc2b-4bd4-89ce-dac8a4d8c970@telfort.nl>

On Fri, Sep 12, 2025 at 04:47:57PM +0200, Benno Schulenberg wrote:
> 
> Op 12-09-2025 om 15:18 schreef Karel Zak:
> > On Thu, Sep 11, 2025 at 03:51:48PM +0200, Benno Schulenberg wrote:
> > > 
> > > Op 11-09-2025 om 15:48 schreef Benno Schulenberg:
> > > > -	fputs(_(" -k                     alias to '--kernel mountinfo'\n"), out);
> > > > -	fputs(_(" --kernel[=<method>]    search in kernel mount table (default)\n"
> > > > +	fputs(_(" -k                     an alias for '--kernel=mountinfo'\n"), out);
> > > > +	fputs(_(" --kernel[=<method>]    search in kernel mount table (default behavior);\n"
> > > 
> > > Karel, do you want to roll an rc2, or shall I just make these changes in
> > > rc1 POT file for the TP?
> > 
> > I think RC1 is sufficient for translations for stable releases; we
> > don’t need as long a stabilization period as for major releases.
> > That’s why I asked for an update on TP.
> > 
> > Or do you think including stable release updates on TP is overkill?
> 
> No -- offering stable dot releases for translation is fine,
> as long as the string changes are the same as made in master.

Changes in the stable branches will always be a subset of changes in
the master branch.

The stable branch is almost always about backports (see "cherry-picked
from" in the commit messages of 'git log stable/v2.41'), whereas in
the master branch we often make more invasive changes.

Also note that before a new master release I always sync po/ and
po-man/ against the latest translations from TP. This means the
initial versions of the po/ and po-man/ strings in the major release
2.42 will be from 2.41.2 (or so).

> What I'm asking is: will you apply the patch (both to master
> and to the stable branch)?  If yes, then I'll edit the rc1 POT
> file to correspond with those changes.  (I don't want to offer
> a faulty string and then see it corrected in the next POT.)

When translators are working on strings, it's best to keep them frozen
and do string fixes in the next release (or next -rc). So I have
applied the patch to the master branch only for now. OK?

For a major release (e.g., v2.42), it would be best to do string
translations twice before the final release to allow time to fix
strings and finalize the translations. Maybe for the final release
it would be best to have

-rc1 ... stabilization only, no translations
-rc2 ... translations, string fixes from translators
-rc3 ... final translations

But I'm not sure translators are ready for such repetitive work
(although the second update will probably be quite small).

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com


^ permalink raw reply

* Re: [PATCH] findmnt: (usage) add a needed equals sign before an optional argument
From: Benno Schulenberg @ 2025-09-15  9:51 UTC (permalink / raw)
  To: Karel Zak; +Cc: util-linux
In-Reply-To: <cspldmiiosndipcki3zybaik2edrf2lstkpxxj27rum5xrlfdc@6a4t452pkz7l>


[-- Attachment #1.1: Type: text/plain, Size: 1254 bytes --]


Op 15-09-2025 om 11:22 schreef Karel Zak:
> When translators are working on strings, it's best to keep them frozen

Translators are currently not working on the strings for 2.41.2,
because I haven't announced the POT file yet.  So it is fine to
still make changes also to the branch.

> and do string fixes in the next release (or next -rc). So I have
> applied the patch to the master branch only for now. OK?

Not OK.  As said: I don't want to offer a faulty string.  Please
apply the patch also to the 2.41 stable branch, so that I can
announce a  better POT file (I will edit it in place -- no need
for another rc release).

> For a major release (e.g., v2.42), it would be best to do string
> translations twice before the final release to allow time to fix
> strings and finalize the translations. Maybe for the final release
> it would be best to have
> 
> -rc1 ... stabilization only, no translations
> -rc2 ... translations, string fixes from translators
> -rc3 ... final translations

That sounds fine.

> But I'm not sure translators are ready for such repetitive work
> (although the second update will probably be quite small).

Ideally I should catch the faulty strings before you make the rc2.


Benno


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

^ permalink raw reply

* Re: [PATCH] findmnt: (usage) add a needed equals sign before an optional argument
From: Karel Zak @ 2025-09-15 11:48 UTC (permalink / raw)
  To: Benno Schulenberg; +Cc: util-linux
In-Reply-To: <13928bd5-c3e3-4b6d-a5a0-3daf6b9e4429@telfort.nl>

On Mon, Sep 15, 2025 at 11:51:01AM +0200, Benno Schulenberg wrote:
> > and do string fixes in the next release (or next -rc). So I have
> > applied the patch to the master branch only for now. OK?
> 
> Not OK.  As said: I don't want to offer a faulty string.  Please
> apply the patch also to the 2.41 stable branch, so that I can
> announce a  better POT file (I will edit it in place -- no need
> for another rc release).

OK, done. Applied to the stable branch, you can edit it in place.

> > For a major release (e.g., v2.42), it would be best to do string
> > translations twice before the final release to allow time to fix
> > strings and finalize the translations. Maybe for the final release
> > it would be best to have
> > 
> > -rc1 ... stabilization only, no translations
> > -rc2 ... translations, string fixes from translators
> > -rc3 ... final translations
> 
> That sounds fine.
> 
> > But I'm not sure translators are ready for such repetitive work
> > (although the second update will probably be quite small).
> 
> Ideally I should catch the faulty strings before you make the rc2.

Yes, that would be best; we can avoid -rc3 and have all strings ready
for -rc2.

Thanks!

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com


^ permalink raw reply

* Re: Security issue : 2021 commit to libblkid breaks existing string sanitization
From: Karel Zak @ 2025-09-15 11:57 UTC (permalink / raw)
  To: Richard Aplin; +Cc: util-linux
In-Reply-To: <CABL=7+y+5E9N1TRi1o+frURgJExQr6=qSWumc3sz=A5APkuCXg@mail.gmail.com>

Hi Richard,

-On Fri, Sep 12, 2025 at 06:33:36PM -0700, Richard Aplin wrote:
-> There was a 2021 commit to libblkid,
 > https://github.com/util-linux/util-linux/commit/6db368598962ea8b0329ae148ab878fd458f2533
> commit label "Optimize the blkid_safe_string() function"
> 
> This is potentially an unsafe change and may allow shell command injection.
 
I disagree. :-)

> 1. The shell command blkid has a mode "-o udev" which was designed to
> output information about block devices in a LABEL=VALUE format for
> consumption by shell scripts.

No, it's designed for use in udev rules where nothing is blindly evaluated or executed.

man blkid is pretty explicit:

udev
       print key="value" pairs for easy import into the udev environment; the keys
       are prefixed by ID_FS_ or ID_PART_ prefixes. The value may be modified to be
       safe for udev environment; allowed is plain ASCII, hex-escaping and valid
       UTF-8, everything else (including whitespaces) is replaced with '_'. The keys
       with _ENC postfix use hex-escaping for unsafe chars.

The _ENC variables keep only A-Za-z, "#+-.:=@_" from ASCII; this means
characters like "$()" are escaped.

> I have seen more than one instance (I
> am looking at one now in a commercial product) where userspace script
> has done:
> eval $(blkid -o udev ...)

Well, this is not a blkid issue; you need at least "| grep _ENC".

> 2. One of the fields returned by blkid (e.g. for a USB stick) is the
> volume label, which would be controllable by an attacker inserting a
> USB stick.
> The blkid 'udev' command code is aware of this danger and sanitizes
> the volume label and other attacker-controllable strings by calling
> the function
> blkid_safe_string(...)
> in libblkid.

It is safe for printing to a terminal, not for any random interpreter
like shell. There is also blkid_encode_string() for more restrictive
needs.

> 3. In previous versions of libblkid the blkid_safe_string function
> used to strip several dangerous ascii characters that would have
> allowed command injection (specifically; backtick, parenthesis, etc.
> It still allowed '$' which is a little dubious).

LABEL= and PARTLABEL= are used in config files, rules, etc., so the
goal is to keep them as unmodified as possible. If we introduce
changes in this area, some machines may fail to boot. It's better to
educate system admins not to blindly use "eval" when security matters.


Yes, I understand that users and admins want the installed system to
prevent all their mistakes instantly, but beyond a certain point it
affects usability.

We can add a note to the man page explicitly warning against using
eval $(blkid -o udev ...) to make it clearer for users.

    Karel


^ permalink raw reply

* [PATCH] blkid: correct an erroneous error message
From: Benno Schulenberg @ 2025-09-16 13:44 UTC (permalink / raw)
  To: util-linux

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

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

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

Now the above command will report:

  blkid: invalid argument: no

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

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
 misc-utils/blkid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/misc-utils/blkid.c b/misc-utils/blkid.c
index 3960b0d97..a8580e538 100644
--- a/misc-utils/blkid.c
+++ b/misc-utils/blkid.c
@@ -651,7 +651,7 @@ static char **list_to_types(const char *list, int *flag)
 		p += 2;
 	}
 	if (!p || !*p) {
-		warnx(_("error: -u <list> argument is empty"));
+		warnx(_("invalid argument: %s"), list);
 		goto err;
 	}
 	for (i = 1; p && (p = strchr(p, ',')); i++, p++);
-- 
2.51.0


^ permalink raw reply related

* [PATCH 1/6] getopt: (usage) make the description of -U fit within 80 columns
From: Benno Schulenberg @ 2025-09-18  8:57 UTC (permalink / raw)
  To: util-linux

(It is good practice to keep --help output from causing ugly
wrapped text when printed to a standard 80-column terminal.)

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
 misc-utils/getopt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/misc-utils/getopt.c b/misc-utils/getopt.c
index 180313cb4..68dba4597 100644
--- a/misc-utils/getopt.c
+++ b/misc-utils/getopt.c
@@ -372,7 +372,7 @@ static void __attribute__((__noreturn__)) usage(void)
 	fputs(_(" -s, --shell <shell>           set quoting conventions to those of <shell>\n"), stdout);
 	fputs(_(" -T, --test                    test for getopt(1) version\n"), stdout);
 	fputs(_(" -u, --unquoted                do not quote the output\n"), stdout);
-	fputs(_(" -U, --unknown                 leave unknown options as they are and disable getopt(3) error messages\n"), stdout);
+	fputs(_(" -U, --unknown                 leave unknown options as they are (implies -q)\n"), stdout);
 	fputs(USAGE_SEPARATOR, stdout);
 	fprintf(stdout, USAGE_HELP_OPTIONS(31));
 	fprintf(stdout, USAGE_MAN_TAIL("getopt(1)"));
-- 
2.51.0


^ permalink raw reply related

* [PATCH 2/6] column: (usage) correct the description of --wrap-separator
From: Benno Schulenberg @ 2025-09-18  8:57 UTC (permalink / raw)
  To: util-linux
In-Reply-To: <20250918085707.41785-1-bensberg@telfort.nl>

Option --wrap-separator does not imply --table-wrap, but requires it
in order to have any effect.

Also, shorten the text a bit to fit within 80 columns.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
 text-utils/column.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/text-utils/column.c b/text-utils/column.c
index 656d4f14a..29ed25b2f 100644
--- a/text-utils/column.c
+++ b/text-utils/column.c
@@ -1007,7 +1007,7 @@ static void __attribute__((__noreturn__)) usage(void)
 	fputs(_(" -R, --table-right <columns>      right align text in these columns\n"), out);
 	fputs(_(" -T, --table-truncate <columns>   truncate text in the columns when necessary\n"), out);
 	fputs(_(" -W, --table-wrap <columns>       wrap text in the columns when necessary\n"), out);
-	fputs(_("     --wrap-separator <string>    wrap text at this separator (implies --table-wrap)\n"), out);
+	fputs(_("     --wrap-separator <string>    wrap at this separator (requires --table-wrap)\n"), out);
 	fputs(_(" -L, --keep-empty-lines           don't ignore empty lines\n"), out);
 	fputs(_(" -J, --json                       use JSON output format for table\n"), out);
 
-- 
2.51.0


^ permalink raw reply related

* [PATCH 3/6] column: (usage) wrap two descriptions, to make them fit within 80 columns
From: Benno Schulenberg @ 2025-09-18  8:57 UTC (permalink / raw)
  To: util-linux
In-Reply-To: <20250918085707.41785-1-bensberg@telfort.nl>

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
 text-utils/column.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/text-utils/column.c b/text-utils/column.c
index 29ed25b2f..7a37cb886 100644
--- a/text-utils/column.c
+++ b/text-utils/column.c
@@ -999,7 +999,8 @@ static void __attribute__((__noreturn__)) usage(void)
 	fputs(_(" -C, --table-column <properties>  define column\n"), out);
 	fputs(_(" -N, --table-columns <names>      comma separated columns names\n"), out);
 	fputs(_(" -l, --table-columns-limit <num>  maximal number of input columns\n"), out);
-	fputs(_(" -E, --table-noextreme <columns>  don't count long text from the columns to column width\n"), out);
+	fputs(_(" -E, --table-noextreme <columns>  don't count long text in these columns\n"
+		"                                    to the column's width\n"), out);
 	fputs(_(" -d, --table-noheadings           don't print header\n"), out);
 	fputs(_(" -m, --table-maxout               fill all available space\n"), out);
 	fputs(_(" -e, --table-header-repeat        repeat header for each page\n"), out);
@@ -1018,7 +1019,8 @@ static void __attribute__((__noreturn__)) usage(void)
 
 	fputs(USAGE_SEPARATOR, out);
 	fputs(_(" -c, --output-width <width>       width of output in number of characters\n"), out);
-	fputs(_(" -o, --output-separator <string>  columns separator for table output (default is two spaces)\n"), out);
+	fputs(_(" -o, --output-separator <string>  columns separator for table output\n"
+		"                                    (default is two spaces)\n"), out);
 	fputs(_(" -s, --separator <string>         possible table delimiters\n"), out);
 	fputs(_(" -x, --fillrows                   fill rows before columns\n"), out);
 	fputs(_(" -S, --use-spaces <number>        minimal whitespaces between columns (no tabs)\n"), out);
-- 
2.51.0


^ permalink raw reply related

* [PATCH 5/6] fallocate: (man) slightly improve the grammar of two sentences
From: Benno Schulenberg @ 2025-09-18  8:57 UTC (permalink / raw)
  To: util-linux
In-Reply-To: <20250918085707.41785-1-bensberg@telfort.nl>

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
 sys-utils/fallocate.1.adoc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys-utils/fallocate.1.adoc b/sys-utils/fallocate.1.adoc
index 69602f01c..0b7ea39db 100644
--- a/sys-utils/fallocate.1.adoc
+++ b/sys-utils/fallocate.1.adoc
@@ -70,7 +70,7 @@ Enable POSIX operation mode. In that mode allocation operation always completes,
 *-z*, *--zero-range*::
 Zeroes space in the byte range starting at _offset_ and continuing for _length_ bytes. Within the specified range, blocks are preallocated for the regions that span the holes in the file. After a successful call, subsequent reads from this range will return zeroes.
 +
-Zeroing is done within the filesystem preferably by converting the range into unwritten extents. This approach means that the specified range will not be physically zeroed out on the device (except for partial blocks at the either end of the range), and I/O is (otherwise) required only to update metadata.
+Zeroing is done within the filesystem preferably by converting the range into unwritten extents. This approach means that the specified range will not be physically zeroed out on the device (except for partial blocks at either end of the range), and I/O is (otherwise) required only to update metadata.
 +
 Option *--keep-size* can be specified to prevent file length modification.
 +
@@ -81,7 +81,7 @@ Zeroes space in the byte range starting at _offset_ and continuing for _length_
 +
 Zeroing is done within the filesystem. The filesystem may use a hardware-accelerated zeroing command or may submit regular writes. The behavior depends on the filesystem design and the available hardware.
 +
-Options *--keep-size* cannot be specified for the write-zeroes operation because allocating written blocks beyond the inode size is not permitted.
+Option *--keep-size* cannot be specified for the write-zeroes operation because allocating written blocks beyond the inode size is not permitted.
 
 include::man-common/help-version.adoc[]
 
-- 
2.51.0


^ permalink raw reply related

* [PATCH 6/6] fallocate: (man,usage) correct the alphabetical sorting of the options
From: Benno Schulenberg @ 2025-09-18  8:57 UTC (permalink / raw)
  To: util-linux
In-Reply-To: <20250918085707.41785-1-bensberg@telfort.nl>

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
 sys-utils/fallocate.1.adoc | 14 +++++++-------
 sys-utils/fallocate.c      |  4 ++--
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/sys-utils/fallocate.1.adoc b/sys-utils/fallocate.1.adoc
index 0b7ea39db..4a96d009d 100644
--- a/sys-utils/fallocate.1.adoc
+++ b/sys-utils/fallocate.1.adoc
@@ -64,6 +64,13 @@ Supported for XFS (since Linux 2.6.38), ext4 (since Linux 3.0), Btrfs (since Lin
 *-v*, *--verbose*::
 Enable verbose mode.
 
+*-w*, *--write-zeroes*::
+Zeroes space in the byte range starting at _offset_ and continuing for _length_ bytes. Within the specified range, written blocks are preallocated for the regions that span the holes in the file. After a successful call, subsequent reads from this range will return zeroes and subsequent writes to that range do not require further changes to the file mapping metadata.
++
+Zeroing is done within the filesystem. The filesystem may use a hardware-accelerated zeroing command or may submit regular writes. The behavior depends on the filesystem design and the available hardware.
++
+Option *--keep-size* cannot be specified for the write-zeroes operation because allocating written blocks beyond the inode size is not permitted.
+
 *-x*, *--posix*::
 Enable POSIX operation mode. In that mode allocation operation always completes, but it may take longer time when fast allocation is not supported by the underlying filesystem.
 
@@ -76,13 +83,6 @@ Option *--keep-size* can be specified to prevent file length modification.
 +
 Available since Linux 3.14 for ext4 (only for extent-based files) and XFS.
 
-*-w*, *--write-zeroes*::
-Zeroes space in the byte range starting at _offset_ and continuing for _length_ bytes. Within the specified range, written blocks are preallocated for the regions that span the holes in the file. After a successful call, subsequent reads from this range will return zeroes and subsequent writes to that range do not require further changes to the file mapping metadata.
-+
-Zeroing is done within the filesystem. The filesystem may use a hardware-accelerated zeroing command or may submit regular writes. The behavior depends on the filesystem design and the available hardware.
-+
-Option *--keep-size* cannot be specified for the write-zeroes operation because allocating written blocks beyond the inode size is not permitted.
-
 include::man-common/help-version.adoc[]
 
 == AUTHORS
diff --git a/sys-utils/fallocate.c b/sys-utils/fallocate.c
index afd615537..f06009483 100644
--- a/sys-utils/fallocate.c
+++ b/sys-utils/fallocate.c
@@ -97,12 +97,12 @@ static void __attribute__((__noreturn__)) usage(void)
 	fputs(_(" -n, --keep-size      maintain the apparent size of the file\n"), out);
 	fputs(_(" -o, --offset <num>   offset for range operations, in bytes\n"), out);
 	fputs(_(" -p, --punch-hole     replace a range with a hole (implies -n)\n"), out);
-	fputs(_(" -z, --zero-range     zero and ensure allocation of a range\n"), out);
+	fputs(_(" -v, --verbose        verbose mode\n"), out);
 	fputs(_(" -w, --write-zeroes   write zeroes and ensure allocation of a range\n"), out);
 #ifdef HAVE_POSIX_FALLOCATE
 	fputs(_(" -x, --posix          use posix_fallocate(3) instead of fallocate(2)\n"), out);
 #endif
-	fputs(_(" -v, --verbose        verbose mode\n"), out);
+	fputs(_(" -z, --zero-range     zero and ensure allocation of a range\n"), out);
 
 	fputs(USAGE_SEPARATOR, out);
 	fprintf(out, USAGE_HELP_OPTIONS(22));
-- 
2.51.0


^ permalink raw reply related

* [PATCH 4/6] fallocate: redo four tweaks that were accidentally undone
From: Benno Schulenberg @ 2025-09-18  8:57 UTC (permalink / raw)
  To: util-linux
In-Reply-To: <20250918085707.41785-1-bensberg@telfort.nl>

Recent commit c407a13fc1 undid some changes that were made by
commits 762f295a02 and 325a269995.  Redo these changes.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
---
 sys-utils/fallocate.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/sys-utils/fallocate.c b/sys-utils/fallocate.c
index 30c391406..afd615537 100644
--- a/sys-utils/fallocate.c
+++ b/sys-utils/fallocate.c
@@ -17,9 +17,8 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://gnu.org/licenses/>.
  */
 #include <sys/stat.h>
 #include <sys/types.h>
@@ -396,16 +395,16 @@ int main(int argc, char **argv)
 		if (length == -2LL)
 			length = 0;
 		if (length < 0)
-			errx(EXIT_FAILURE, _("invalid length value specified"));
+			errx(EXIT_FAILURE, _("invalid length"));
 	} else {
 		/* it's safer to require the range specification (--length --offset) */
 		if (length == -2LL)
 			errx(EXIT_FAILURE, _("no length argument specified"));
 		if (length <= 0)
-			errx(EXIT_FAILURE, _("invalid length value specified"));
+			errx(EXIT_FAILURE, _("invalid length"));
 	}
 	if (offset < 0)
-		errx(EXIT_FAILURE, _("invalid offset value specified"));
+		errx(EXIT_FAILURE, _("invalid offset"));
 
 	/* O_CREAT makes sense only for the default fallocate(2) behavior
 	 * when mode is no specified and new space is allocated */
-- 
2.51.0


^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox