]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
5 weeks agotools: add git-compare-backport script
Karel Zak [Thu, 19 Mar 2026 10:52:24 +0000 (11:52 +0100)] 
tools: add git-compare-backport script

Compare commit subject lines between master and a stable/* branch
to identify commits missing from the stable branch (backport
candidates). Merge commits are ignored, cherry-picked commits are
detected by matching subject lines.

Signed-off-by: Karel Zak <kzak@redhat.com>
5 weeks agotools: (compare-buildsys) suppress common lines in diff output
Karel Zak [Thu, 19 Mar 2026 10:30:07 +0000 (11:30 +0100)] 
tools: (compare-buildsys) suppress common lines in diff output

Signed-off-by: Karel Zak <kzak@redhat.com>
5 weeks agoMerge branch 'dependabot/github_actions/actions/upload-artifact-7' of github.com...
Karel Zak [Thu, 19 Mar 2026 10:11:04 +0000 (11:11 +0100)] 
Merge branch 'dependabot/github_actions/actions/upload-artifact-7' of github.com:util-linux/util-linux

5 weeks agoMerge branch 'PR/strutils-parse-bool' of https://github.com/karelzak/util-linux-work
Karel Zak [Thu, 19 Mar 2026 10:07:22 +0000 (11:07 +0100)] 
Merge branch 'PR/strutils-parse-bool' of https://github.com/karelzak/util-linux-work

* 'PR/strutils-parse-bool' of https://github.com/karelzak/util-linux-work:
  tests: add strtobool test
  lib/strutils: add ul_strtobool()

5 weeks agobash-completion: (unshare) remove embedded tabs from option strings
Karel Zak [Thu, 19 Mar 2026 10:06:20 +0000 (11:06 +0100)] 
bash-completion: (unshare) remove embedded tabs from option strings

Line continuations in the option string assignments preserved the
leading tab (code indentation) from continuation lines, embedding
literal tab characters into the variable values. This broke regex
matching in the offset-detection loop for --mount-proc (OPTARGOPTS),
--map-groups (REQARGOPTS), and --map-subids (NOARGOPTS).

Addresses: https://github.com/util-linux/util-linux/pull/4084
Signed-off-by: Karel Zak <kzak@redhat.com>
5 weeks agoMerge branch 'unshare_bash_completion_refactor' of https://github.com/cgoesche/util...
Karel Zak [Thu, 19 Mar 2026 10:05:12 +0000 (11:05 +0100)] 
Merge branch 'unshare_bash_completion_refactor' of https://github.com/cgoesche/util-linux-fork

* 'unshare_bash_completion_refactor' of https://github.com/cgoesche/util-linux-fork:
  bash-completion: add improvements to unshare(1) completions

5 weeks agoMerge branch 'debug_c' of https://github.com/stoeckmann/util-linux
Karel Zak [Thu, 19 Mar 2026 09:48:00 +0000 (10:48 +0100)] 
Merge branch 'debug_c' of https://github.com/stoeckmann/util-linux

* 'debug_c' of https://github.com/stoeckmann/util-linux:
  lib/debug: Move debug functions into c file

5 weeks agoMerge branch 'PR/findmnt-sigsegv-empty-file' of https://github.com/karelzak/util...
Karel Zak [Thu, 19 Mar 2026 09:41:11 +0000 (10:41 +0100)] 
Merge branch 'PR/findmnt-sigsegv-empty-file' of https://github.com/karelzak/util-linux-work

* 'PR/findmnt-sigsegv-empty-file' of https://github.com/karelzak/util-linux-work:
  findmnt: fix SIGSEGV when parsing empty file

5 weeks agoMerge branch 'PR/benno-copyfilerange-files' of https://github.com/karelzak/util-linux...
Karel Zak [Thu, 19 Mar 2026 09:40:45 +0000 (10:40 +0100)] 
Merge branch 'PR/benno-copyfilerange-files' of https://github.com/karelzak/util-linux-work

* 'PR/benno-copyfilerange-files' of https://github.com/karelzak/util-linux-work:
  tests: (copyfilerange) update expected output for changed wording
  copyfilerange: simply report "too few arguments", not misleading messages
  copyfilerange: wrap some overlong lines (in a tabsize-independent way)

5 weeks agobash-completion: add improvements to unshare(1) completions
Christian Goeschel Ndjomouo [Fri, 27 Feb 2026 23:29:27 +0000 (18:29 -0500)] 
bash-completion: add improvements to unshare(1) completions

This change adds the ability to complete the command of the
executable that the unshare command is going to execute.

Additionally, it includes support for completions of long
options that have optional arguments and are thus specified
with a suffixed '=' sign, which delimits the option name
from the actual option argument.

Lastly, it also adds file/directory completions for options that
require file or directory paths as arguments.

Addresses: #4073
Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
5 weeks agolib/debug: Move debug functions into c file
Tobias Stoeckmann [Fri, 13 Mar 2026 17:25:25 +0000 (18:25 +0100)] 
lib/debug: Move debug functions into c file

Having the debug functions as static inline functions throughout the
code base leads to code bloat, since they always serve the same purpose
without custom modifications.

Keep defines and everything specific to an including file in a header, but
move function bodies into their own c file.

Reduces size of util-linux installation by up to 80 KB on x86_64.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
5 weeks agogitignore: replace CLAUDE.md with .claude/ directory
Karel Zak [Wed, 18 Mar 2026 13:10:53 +0000 (14:10 +0100)] 
gitignore: replace CLAUDE.md with .claude/ directory

Signed-off-by: Karel Zak <kzak@redhat.com>
5 weeks agotests: add SCS escape sequence test for column
Karel Zak [Wed, 18 Mar 2026 12:04:08 +0000 (13:04 +0100)] 
tests: add SCS escape sequence test for column

Convert the ansiescape test to use subtests and add a test
for SCS (Select Character Set) escape sequences to verify
they are properly skipped in width calculation.

Addresses: https://github.com/util-linux/util-linux/issues/4121
Signed-off-by: Karel Zak <kzak@redhat.com>
5 weeks agombsalign: cleanup escape sequences handling
Karel Zak [Wed, 18 Mar 2026 11:48:54 +0000 (12:48 +0100)] 
mbsalign: cleanup escape sequences handling

Use '\033' (portable) instead of '\e' (GNU extension), simplify
the control character handling by checking for ESC directly, and
fix the SCS boundary check to only match complete sequences.

Signed-off-by: Karel Zak <kzak@redhat.com>
5 weeks agoMerge branch 'fix/4121' of https://github.com/echoechoin/util-linux
Karel Zak [Wed, 18 Mar 2026 11:36:37 +0000 (12:36 +0100)] 
Merge branch 'fix/4121' of https://github.com/echoechoin/util-linux

* 'fix/4121' of https://github.com/echoechoin/util-linux:
  mbsalign: validate ESC character before processing escape sequences
  mbsalign: add support for SCS escape sequences

5 weeks agofindmnt: fix SIGSEGV when parsing empty file
Karel Zak [Wed, 18 Mar 2026 11:01:11 +0000 (12:01 +0100)] 
findmnt: fix SIGSEGV when parsing empty file

Set mnt_table_set_userdata() right after mnt_new_table() in all
functions that create a libmount table, so that parser_errcb() can
always safely access the findmnt userdata.

Previously, userdata was set only in main() after parse_tabfiles()
returned, meaning the error callback would dereference a NULL pointer
when encountering parse errors (e.g., an empty file passed via -F).

Also add a NULL guard in parser_errcb() as a safety net, and a test
for the empty file case.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2448233
Signed-off-by: Karel Zak <kzak@redhat.com>
5 weeks agotests: (copyfilerange) update expected output for changed wording
Karel Zak [Wed, 18 Mar 2026 10:29:42 +0000 (11:29 +0100)] 
tests: (copyfilerange) update expected output for changed wording

Signed-off-by: Karel Zak <kzak@redhat.com>
5 weeks agotests: add strtobool test
Karel Zak [Wed, 18 Mar 2026 10:17:41 +0000 (11:17 +0100)] 
tests: add strtobool test

Signed-off-by: Karel Zak <kzak@redhat.com>
5 weeks agolib/strutils: add ul_strtobool()
Karel Zak [Wed, 18 Mar 2026 10:17:31 +0000 (11:17 +0100)] 
lib/strutils: add ul_strtobool()

Add a locale-independent string to boolean parsing function.
Supported true values: 1, y, t, yes, true, on, enable.
Supported false values: 0, no, not, false, off, disable.

Signed-off-by: Karel Zak <kzak@redhat.com>
6 weeks agocopyfilerange: simply report "too few arguments", not misleading messages
Benno Schulenberg [Mon, 16 Mar 2026 11:09:38 +0000 (12:09 +0100)] 
copyfilerange: simply report "too few arguments", not misleading messages

Running ./copyfilerange without any arguments would report:

  copyfilerange: source file is required

giving the impression that only a source file is required.
But running ./copyfilerange with one argument would report:

  copyfilerange: destination file is required

giving the impression that specifying two files would be enough.
But running ./copyfilerange with two arguments would report:

  copyfilerange: nothing to do, no ranges supplied

Instead of these custom messages, let's report what other tools
report when given too few arguments: "too few arguments".

This change also prevents `copyfilerange` from creating an empty
destination file when given just two arguments, when it reported
that there was nothing to do.

Furthermore, correct a parameter of a call of err(),
from `argv[2]` to `range.out_filename`.

CC: Dick Marinus <dick@mrns.nl>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
6 weeks agocopyfilerange: wrap some overlong lines (in a tabsize-independent way)
Benno Schulenberg [Mon, 16 Mar 2026 11:09:37 +0000 (12:09 +0100)] 
copyfilerange: wrap some overlong lines (in a tabsize-independent way)

Most tools in util-linux seem to assume a tabsize of 8, judging from
the alignments of several continuation lines.  But `copyfilerange.c`
appears to have assumed a tabsize of 2, because with a tabsize of 8
the text on line 147 started in column 209!

But even with a tabsize of 2, three lines were much wider than the
reasonable 100 columns.  So, wrap those, and in the bargain improve
the wording of the affected messages, and add a space before %m.

CC: Dick Marinus <dick@mrns.nl>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
6 weeks agombsalign: validate ESC character before processing escape sequences
WanBingjiang [Tue, 17 Mar 2026 02:19:08 +0000 (10:19 +0800)] 
mbsalign: validate ESC character before processing escape sequences

Only process escape sequences when the control character is ESC.
This prevents \n[ or \n( from being misidentified as escape sequences.

Signed-off-by: WanBingjiang <wanbingjiang@webray.com.cn>
6 weeks agombsalign: add support for SCS escape sequences
WanBingjiang [Tue, 17 Mar 2026 02:17:15 +0000 (10:17 +0800)] 
mbsalign: add support for SCS escape sequences

Add handling for SCS (Select Character Set) escape sequences:
\e(X, \e)X, \e*X, \e+X. These sequences are now properly skipped
when calculating string width.

Addresses: https://github.com/util-linux/util-linux/issues/4121
Signed-off-by: WanBingjiang <wanbingjiang@webray.com.cn>
6 weeks agochmem: fix segfault when parameter is just a dash
Karel Zak [Mon, 16 Mar 2026 13:02:55 +0000 (14:02 +0100)] 
chmem: fix segfault when parameter is just a dash

When running "chmem --disable -", ul_strv_split("-", "-") returns an
empty array (length 0) because the input string contains only the
separator. The code only checked for length > 2, so length 0 fell
through to parse_range_param() with NULL pointers, causing a segfault
in strlen().

Fix by rejecting parameters that produce fewer than 1 token, and add
NULL checks in parse_range_param() for additional robustness.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2447899
Signed-off-by: Karel Zak <kzak@redhat.com>
6 weeks agoMerge branch 'improve/4119' of https://github.com/echoechoin/util-linux
Karel Zak [Mon, 16 Mar 2026 12:47:15 +0000 (13:47 +0100)] 
Merge branch 'improve/4119' of https://github.com/echoechoin/util-linux

* 'improve/4119' of https://github.com/echoechoin/util-linux:
  getopt: document whitespace as separator in --longoptions

6 weeks agocopyfilerange: (man) correct the markup and improve the wordings
Benno Schulenberg [Thu, 12 Mar 2026 15:55:32 +0000 (16:55 +0100)] 
copyfilerange: (man) correct the markup and improve the wordings

CC: Dick Marinus <dick@mrns.nl>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
6 weeks agocopyfilerange: (usage) correct the markup and improve the wording
Benno Schulenberg [Thu, 12 Mar 2026 15:55:31 +0000 (16:55 +0100)] 
copyfilerange: (usage) correct the markup and improve the wording

The <source>, <destination>, and <range> arguments are required,
so do not mark them as optional (with the square brackets).
Also, trim the redundant lines about the source and destination
files, improve the explanation for the <range> argument and put
it after the options, and keep the text within 80 columns.

Furthermore, list the short options first (as is custom), and
match the indentaion of the -h and -V options to the others.

CC: Dick Marinus <dick@mrns.nl>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
6 weeks agolsmem: (man) correct the markup of column names, and improve some grammar
Benno Schulenberg [Sat, 7 Mar 2026 11:43:08 +0000 (12:43 +0100)] 
lsmem: (man) correct the markup of column names, and improve some grammar

The column names should be marked in bold and not in italics, as they
are literal values, not placeholders.

Also, indent the list of column names, to make it clearer where the
list ends.  And add the missing markup for "RANGE" and the missing
name "REMOVABLE".

Furthermore, drop the small table, as it held nearly no information
and was confusing: the explicit numbers in the BLOCK column gave the
impression that block 0 can only be online, block 1 only offline but
configured, and block 2 only offline and deconfigured.  The content
of the MEMMAP-ON-MEMORY column being always "yes/no" was useless.
Leaving out those columns left only STATE and CONFIGURED, where the
values implied that memory can only be online when it is configured.
This information can be conveyed in a single sentence.

(The table was added in commit 6f1e4ff054 from five months ago.)

CC: Sumanth Korikkar <sumanthk@linux.ibm.com>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
6 weeks agolibblkid: add debug message for private DM device skip
Karel Zak [Mon, 16 Mar 2026 10:43:19 +0000 (11:43 +0100)] 
libblkid: add debug message for private DM device skip

Add a DBG() trace and set errno = EINVAL when
blkid_new_probe_from_filename() skips a private device-mapper
device, to aid troubleshooting and distinguish from I/O errors.

Addresses: https://github.com/util-linux/util-linux/pull/4120
Signed-off-by: Karel Zak <kzak@redhat.com>
6 weeks agoMerge branch 'private-dm' of https://github.com/zkabelac/util-linux
Karel Zak [Mon, 16 Mar 2026 10:41:27 +0000 (11:41 +0100)] 
Merge branch 'private-dm' of https://github.com/zkabelac/util-linux

* 'private-dm' of https://github.com/zkabelac/util-linux:
  libblkid: check for private DM device before open

6 weeks agoMerge branch 'PR/libsmartcols-width-calc' of https://github.com/karelzak/util-linux...
Karel Zak [Mon, 16 Mar 2026 10:18:45 +0000 (11:18 +0100)] 
Merge branch 'PR/libsmartcols-width-calc' of https://github.com/karelzak/util-linux-work

* 'PR/libsmartcols-width-calc' of https://github.com/karelzak/util-linux-work:
  tests: update to reflect libsmartcols changes
  libsmartcols: enlarge columns with absolute width hint
  column: Add notes about the role of the column header
  libsmartcols: improve truncation of column width
  tests: add column strictwidth test
  libsmartcols: fix column width calculation
  libsmartcols: fix width= property parsing

6 weeks agoMerge branch 'PR/dmesg-delta-notime' of https://github.com/karelzak/util-linux-work
Karel Zak [Mon, 16 Mar 2026 10:18:30 +0000 (11:18 +0100)] 
Merge branch 'PR/dmesg-delta-notime' of https://github.com/karelzak/util-linux-work

* 'PR/dmesg-delta-notime' of https://github.com/karelzak/util-linux-work:
  dmesg: rename is_time_fmt_set() to is_time_fmt()
  dmesg: warn on boot time failure instead of suppressing timestamps
  dmesg: add replace_time_fmt() and replace_delta_fmt() helpers
  tests: add dmesg -d -t and -t -d timestamp format tests
  dmesg: fix -d -t (--show-delta --notime) output regression
  dmesg: remove delta variable, use time format list consistently

6 weeks agogetopt: document whitespace as separator in --longoptions
WanBingjiang [Mon, 16 Mar 2026 03:59:56 +0000 (11:59 +0800)] 
getopt: document whitespace as separator in --longoptions

  The --longoptions option accepts not only commas but also whitespace
  (spaces, tabs, or newlines) as separators between option names.
  Update the man page to reflect this behavior.

  Addresses: https://github.com/util-linux/util-linux/issues/4119

6 weeks agolibblkid: check for private DM device before open
Zdenek Kabelac [Sat, 14 Mar 2026 13:39:41 +0000 (14:39 +0100)] 
libblkid: check for private DM device before open

blkid_new_probe_from_filename() opens the device before calling
blkid_probe_set_device(), which checks sysfs_devno_is_dm_private()
and sets BLKID_FL_NOSCAN_DEV.  But the open() itself bumps the
kernel open count, so a concurrent DM_DEVICE_REMOVE ioctl sees
EBUSY even though blkid never actually probes the device.

Move the private-device check before open() in
blkid_new_probe_from_filename().  The sysfs UUID is readable
without opening the block device, so this closes the race window
between udev-worker's blkid builtin and device-mapper remove.

Note: blkid_verify() in verify.c already does the check before
open() -- this patch makes the probe path consistent.

Signed-off-by: Zdenek Kabelac <zkabelac@redhat.com>
6 weeks agobuild: link test_pager against lib_common in meson too
YuriyRyabikov [Fri, 13 Mar 2026 17:45:04 +0000 (17:45 +0000)] 
build: link test_pager against lib_common in meson too

Same fix as the Autotools Makemodule.am change — the Meson build
also needs lib_common for ul_strfconcat().

6 weeks agobuild: link test_pager against libcommon
YuriyRyabikov [Fri, 13 Mar 2026 17:37:27 +0000 (17:37 +0000)] 
build: link test_pager against libcommon

pager.c now uses ul_strfconcat() from strutils.c, so the
test_pager binary needs libcommon.la to resolve the symbol.

6 weeks agopager: use ul_strfconcat() instead of fixed-size buffer
YuriyRyabikov [Fri, 13 Mar 2026 17:28:36 +0000 (17:28 +0000)] 
pager: use ul_strfconcat() instead of fixed-size buffer

Replace char less_val[256] with dynamically allocated ul_strfconcat()
to avoid silent truncation when LESS env is already long.

6 weeks agopager: support --header 0,M for column-only freezing
YuriyRyabikov [Fri, 13 Mar 2026 17:12:14 +0000 (17:12 +0000)] 
pager: support --header 0,M for column-only freezing

less accepts --header 0,M to freeze columns without header lines.
Handle header_width > 0 independently of header_lines.

6 weeks agopager: address review feedback for less --header support
YuriyRyabikov [Fri, 13 Mar 2026 16:34:19 +0000 (16:34 +0000)] 
pager: address review feedback for less --header support

- Remove static globals; store header_lines/header_width in
  struct child_process instead
- Invert pager_open/pager_open_header: pager_open() now calls
  pager_open_header(0, 0) as a thin wrapper
- Append --header to existing LESS value when set, instead of
  silently skipping header setup
- Flatten nested if-blocks into single setenv() call
- Use int consistently instead of mixing int and size_t
- Document that header_lines=0 means no header regardless of width

6 weeks agolibsmartcols: add scols_table_calculate to docs sections
kurok [Fri, 13 Mar 2026 11:41:18 +0000 (11:41 +0000)] 
libsmartcols: add scols_table_calculate to docs sections

Add the new scols_table_calculate() symbol to the
libsmartcols-sections.txt documentation file to fix the
checklibdoc CI check.

6 weeks agolibsmartcols: add scols_table_calculate(), pager: add less --header support
kurok [Fri, 13 Mar 2026 11:31:33 +0000 (11:31 +0000)] 
libsmartcols: add scols_table_calculate(), pager: add less --header support

Add scols_table_calculate() public API to allow column width calculation
without printing. This enables callers to query column widths (via
scols_column_get_width()) before starting output, which is needed to
set up "less --header" for freezing table headers and the first column.

The new function runs __scols_initialize_printing() (which includes
__scols_calculate()) and sets an is_calculated flag so that subsequent
scols_print_table() calls skip redundant recalculation.

Add pager_open_header() to lib/pager.c that sets the LESS environment
variable with "--header N,M" options before spawning the pager process.
This freezes the first N lines (header row) and first M character columns
(first table column) when scrolling in less.

Addresses: https://github.com/util-linux/util-linux/issues/3542

6 weeks agoautotools: Remove the need for --disable-liblastlog2
Karel Zak [Thu, 12 Mar 2026 13:13:59 +0000 (14:13 +0100)] 
autotools: Remove the need for --disable-liblastlog2

We typically build all in-tree libraries, but liblastlog2 requires an
external dependency on sqlite3. It doesn't make sense to force all
users to use --disable-liblastlog2 to explicitly disable it.

Let's check for sqlite3, and if it's not installed, disable the library.

Addresses: https://github.com/util-linux/util-linux/issues/4112#issuecomment-4042305081
Signed-off-by: Karel Zak <kzak@redhat.com>
6 weeks agodmesg: rename is_time_fmt_set() to is_time_fmt()
Karel Zak [Thu, 12 Mar 2026 12:26:47 +0000 (13:26 +0100)] 
dmesg: rename is_time_fmt_set() to is_time_fmt()

Shorten the function name for consistency with the other time format
helpers (include_time_fmt, exclude_time_fmt, replace_time_fmt).
No functional change.

Signed-off-by: Karel Zak <kzak@redhat.com>
6 weeks agodmesg: warn on boot time failure instead of suppressing timestamps
Karel Zak [Thu, 12 Mar 2026 12:22:55 +0000 (13:22 +0100)] 
dmesg: warn on boot time failure instead of suppressing timestamps

When dmesg_get_boot_time() fails, warn the user instead of silently
adding DMESG_TIMEFTM_NONE to suppress all timestamp output. The user
asked for a specific format and should get it, with a warning that
wall-clock timestamps may be inaccurate.

Also move the boot time check after the time format post-processing
so it operates on the final resolved format list, and add
DMESG_TIMEFTM_CTIME_DELTA to the condition since it also requires
boot time.

Signed-off-by: Karel Zak <kzak@redhat.com>
6 weeks agodmesg: add replace_time_fmt() and replace_delta_fmt() helpers
Karel Zak [Thu, 12 Mar 2026 12:04:35 +0000 (13:04 +0100)] 
dmesg: add replace_time_fmt() and replace_delta_fmt() helpers

Introduce replace_time_fmt() to replace one time format with another
in the format list, and replace_delta_fmt() which combines
exclude_time_fmt() + replace_time_fmt() into a single call.

This deduplicates the for-loop pattern repeated in the delta
merging post-processing.

Signed-off-by: Karel Zak <kzak@redhat.com>
6 weeks agotests: add dmesg -d -t and -t -d timestamp format tests
Karel Zak [Thu, 12 Mar 2026 11:56:27 +0000 (12:56 +0100)] 
tests: add dmesg -d -t and -t -d timestamp format tests

Add two sub-tests to verify that -d -t (delta-notime) and -t -d
(notime-delta) both produce delta-only output regardless of option
order.

Addresses: https://github.com/util-linux/util-linux/issues/4110
Signed-off-by: Karel Zak <kzak@redhat.com>
6 weeks agodmesg: fix -d -t (--show-delta --notime) output regression
Karel Zak [Thu, 12 Mar 2026 11:56:14 +0000 (12:56 +0100)] 
dmesg: fix -d -t (--show-delta --notime) output regression

When -d and -t are used together, only the time delta should be
printed without the timestamp prefix. This was broken because
DMESG_TIMEFTM_NONE in the format list caused the print_record()
loop to break early before processing the delta format.

Resolve the conflict after option parsing: when NONE coexists with
a delta format (TIME_DELTA or DELTA), replace all formats with just
DELTA. When NONE is used without delta, it suppresses all timestamps
as before.

Fixes: https://github.com/util-linux/util-linux/issues/4110
Signed-off-by: Karel Zak <kzak@redhat.com>
6 weeks agodmesg: remove delta variable, use time format list consistently
Karel Zak [Thu, 12 Mar 2026 11:52:33 +0000 (12:52 +0100)] 
dmesg: remove delta variable, use time format list consistently

Replace the separate 'delta' flag variable with direct use of the
time format list for all timestamp-related options:

 -d (--show-delta) now calls include_time_fmt(DMESG_TIMEFTM_TIME_DELTA)
 -t (--notime) now calls include_time_fmt(DMESG_TIMEFTM_NONE) without
    reset_time_fmts(), same as --time-format notime

This makes -d and -t behave the same way as their --time-format
equivalents, storing all requested formats in the format list
for post-getopt resolution.

The delta merging logic is split into two blocks:
 - TIME_DELTA + CTIME → CTIME_DELTA (for -d -T)
 - DELTA + TIME/CTIME → TIME_DELTA/CTIME_DELTA (for --time-format delta)

Addresses: https://github.com/util-linux/util-linux/issues/4110
Signed-off-by: Karel Zak <kzak@redhat.com>
6 weeks agowaitpid: consistently write the abbreviation "PID" in all-uppercase
Benno Schulenberg [Mon, 9 Mar 2026 11:15:44 +0000 (12:15 +0100)] 
waitpid: consistently write the abbreviation "PID" in all-uppercase

Also, use %d instead of %u, as all other comparable messages use %d.

CC: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
6 weeks agonsenter: (man) correct the markup and improve the formatting
Benno Schulenberg [Sun, 8 Mar 2026 11:20:04 +0000 (12:20 +0100)] 
nsenter: (man) correct the markup and improve the formatting

Remove the mistaken angle brackets that were introduced last month
by commit f2a5997869, add the missing equals sign, and put both it
and the subsequent colon in bold as they are literal characters.

Also, indent the list of paths to make it clearer where it ends,
and so that the subsequent paragraph gets indented correctly.

CC: Xiao Liang <shaw.leon@gmail.com>
CC: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
6 weeks agonsenter: (usage) improve the alignment of the option descriptions
Benno Schulenberg [Sun, 8 Mar 2026 11:20:03 +0000 (12:20 +0100)] 
nsenter: (usage) improve the alignment of the option descriptions

Perfect alignment is not possible, otherwise too little space remains
for the descriptions.

Also, slightly reword one description to fit within 80 columns again,
and align also a description that was missed by commit 986188d1da two
monts ago.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
6 weeks agonsenter: (usage) correct the formatting of eight option arguments
Benno Schulenberg [Sun, 8 Mar 2026 11:20:02 +0000 (12:20 +0100)] 
nsenter: (usage) correct the formatting of eight option arguments

Angle brackets should wrap each placeholder separately: <file> and
<nsid>.  Angle brackets should not enclose metacharacters (|) nor
literal ones (= and :).

(The mistaken formatting was introduced by commit f2a5997869.)

CC: Xiao Liang <shaw.leon@gmail.com>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
6 weeks agolsmem: correct the grammar of an error message
Benno Schulenberg [Sat, 7 Mar 2026 11:43:07 +0000 (12:43 +0100)] 
lsmem: correct the grammar of an error message

That is: make the message identical to its twin nine lines back.

(The spello was introduced by commit 92d018a105 from five months ago.)

CC: Sumanth Korikkar <sumanthk@linux.ibm.com>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
6 weeks agoMerge branch 'improve/4070' of https://github.com/echoechoin/util-linux
Karel Zak [Thu, 12 Mar 2026 10:10:15 +0000 (11:10 +0100)] 
Merge branch 'improve/4070' of https://github.com/echoechoin/util-linux

* 'improve/4070' of https://github.com/echoechoin/util-linux:
  man: add ENVIRONMENT section for smartcols support in various man pages
  man: hide LIBSMARTCOLS_JSON in man pages that do not support --json

6 weeks agotests: update to reflect libsmartcols changes
Karel Zak [Thu, 12 Mar 2026 09:46:57 +0000 (10:46 +0100)] 
tests: update to reflect libsmartcols changes

The library now reduces the width of columns even when a width hint is
specified. This affects some test outputs, particularly those where
small numbers appear in columns with a width hint wider than the
column header (e.g., SIZE with hint=5).

Signed-off-by: Karel Zak <kzak@redhat.com>
6 weeks agolibsmartcols: enlarge columns with absolute width hint
Karel Zak [Thu, 12 Mar 2026 09:40:45 +0000 (10:40 +0100)] 
libsmartcols: enlarge columns with absolute width hint

The width hint is strictly followed only if SCOLS_FL_STRICTWIDTH is
specified. The previous patch ensures minimal space usage for all
other columns. This patch enlarges columns with an absolute hint (>
1.0) until the hints are satisfied and there is free space on screen.

Signed-off-by: Karel Zak <kzak@redhat.com>
6 weeks agoman: add ENVIRONMENT section for smartcols support in various man pages
WanBingjiang [Sat, 28 Feb 2026 03:56:32 +0000 (11:56 +0800)] 
man: add ENVIRONMENT section for smartcols support in various man pages

This update introduces an ENVIRONMENT section to the man pages
of several utilities. The section includes references to the common
environment variable for smart column output, ensuring consistent
documentation across tools that support the --json output format.

6 weeks agoterminal-colors.d: (man) re-apply improvements lost in merge
Benno Schulenberg [Wed, 11 Mar 2026 11:35:57 +0000 (12:35 +0100)] 
terminal-colors.d: (man) re-apply improvements lost in merge

Commit 3252142521 improved the man page formatting and wording,
but merge commit d708fc7db6 undid all those changes due to a
conflict resolution mess.  Re-apply the improvements:

 - do not show 'type' as an optional part in the synopsis
 - indent the list of file types for clarity
 - correct and improve several wordings
 - fix grammar ("which provide" not "which provides")
 - compact the examples section

Addresses: https://github.com/util-linux/util-linux/commit/3252142521
Signed-off-by: Karel Zak <kzak@redhat.com>
6 weeks agocolumn: Add notes about the role of the column header
Karel Zak [Wed, 11 Mar 2026 11:07:09 +0000 (12:07 +0100)] 
column: Add notes about the role of the column header

Addresses: https://github.com/util-linux/util-linux/issues/4104
Signed-off-by: Karel Zak <kzak@redhat.com>
6 weeks agolibsmartcols: improve truncation of column width
Karel Zak [Wed, 11 Mar 2026 10:41:36 +0000 (11:41 +0100)] 
libsmartcols: improve truncation of column width

The worst case is to aggressively truncate the largest column. The
default is to reduce it by three characters, but if the needed space
is smaller than three characters, it's better to be less aggressive.

Signed-off-by: Karel Zak <kzak@redhat.com>
6 weeks agotests: add column strictwidth test
Karel Zak [Wed, 11 Mar 2026 10:32:48 +0000 (11:32 +0100)] 
tests: add column strictwidth test

Signed-off-by: Karel Zak <kzak@redhat.com>
6 weeks agolibsmartcols: fix column width calculation
Karel Zak [Wed, 11 Mar 2026 09:55:11 +0000 (10:55 +0100)] 
libsmartcols: fix column width calculation

echo -e "a b c\na b c" | ./column --table --table-column "name=X,width=5" -C "name=YY,width=5" -C "name=Z" --output-separator '|'
X    |YY|Z
a    |b |c
a    |b |c

The only difference between the X and YY columns is the column name.
The column header width affects the use of the width property. This
occurs when the minimum and maximum column widths are the same ("YY").

Fixed version:

echo -e "a b c\na b c" | ./column --table --table-column "name=X,width=5" -C "name=YY,width=5" -C "name=Z" --output-separator '|'
X|YY|Z
a|b |c
a|b |c

Note that width= is just a hint and should not be used when the
'strictwidth' property is not specified.

Signed-off-by: Karel Zak <kzak@redhat.com>
6 weeks agolibsmartcols: fix width= property parsing
Karel Zak [Wed, 11 Mar 2026 10:24:01 +0000 (11:24 +0100)] 
libsmartcols: fix width= property parsing

The code uses 'errno' to detect errors, but the variable is not set to
zero before parsing the number. As a result, any previous error can
affect the width number parsing.

Signed-off-by: Karel Zak <kzak@redhat.com>
7 weeks agomkfs.cramfs: Properly check mmap results
Tobias Stoeckmann [Tue, 10 Mar 2026 17:11:02 +0000 (18:11 +0100)] 
mkfs.cramfs: Properly check mmap results

The POSIX manual page states that the error return value is MAP_FAILED.
Sync with all other mmap checks throughout util-linux.

Also, test an mmap call which previously was not tested.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
7 weeks agoumount: fix --graceful option cosmetics and tests
Karel Zak [Tue, 10 Mar 2026 12:31:09 +0000 (13:31 +0100)] 
umount: fix --graceful option cosmetics and tests

- fix missing comma in man page option syntax
- fix typo "succesfully" -> "successfully"
- move --graceful before --namespace in help text
- shorten help text to single line
- improve man page description, add root-only note
- add test for non-existent path with --graceful

Addresses: https://github.com/util-linux/util-linux/pull/4059
Signed-off-by: Karel Zak <kzak@redhat.com>
7 weeks agoMerge branch 'umount_graceful_option' of https://github.com/cgoesche/util-linux-fork
Karel Zak [Tue, 10 Mar 2026 12:25:42 +0000 (13:25 +0100)] 
Merge branch 'umount_graceful_option' of https://github.com/cgoesche/util-linux-fork

* 'umount_graceful_option' of https://github.com/cgoesche/util-linux-fork:
  umount: add test for --graceful option
  umount: new --graceful option to exit successfully even if filesystem is unmounted

7 weeks agoMerge branch 'PR/meson-libcommon-duplicates' of https://github.com/karelzak/util...
Karel Zak [Tue, 10 Mar 2026 09:57:37 +0000 (10:57 +0100)] 
Merge branch 'PR/meson-libcommon-duplicates' of https://github.com/karelzak/util-linux-work

* 'PR/meson-libcommon-duplicates' of https://github.com/karelzak/util-linux-work:
  lib/meson: move caputils.c from lib_common to per-binary sources
  lib/meson: remove unconditional procfs.c from lib_common_sources
  lib/meson: remove duplicated source files from lib_common_sources

7 weeks agofsck: Fix stack overflow with many options
Tobias Stoeckmann [Sat, 7 Mar 2026 20:08:33 +0000 (21:08 +0100)] 
fsck: Fix stack overflow with many options

If fsck is given too many options, a stack overflow can occur because
these options are temporarily stored in a fixed sized array on stack.

As with arguments, check if too many options are supplied and call errx
if this is the case.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
7 weeks agoMerge branch 'eject_oob' of https://github.com/stoeckmann/util-linux
Karel Zak [Mon, 9 Mar 2026 12:57:09 +0000 (13:57 +0100)] 
Merge branch 'eject_oob' of https://github.com/stoeckmann/util-linux

* 'eject_oob' of https://github.com/stoeckmann/util-linux:
  eject: Fix OOB access with empty argument

7 weeks agochmem: check ul_path_read_buffer() return value
Karel Zak [Mon, 9 Mar 2026 12:56:37 +0000 (13:56 +0100)] 
chmem: check ul_path_read_buffer() return value

Reported-by: Coverity Scan
Signed-off-by: Karel Zak <kzak@redhat.com>
7 weeks agoMerge branch 'pg_sigchld' of https://github.com/stoeckmann/util-linux
Karel Zak [Mon, 9 Mar 2026 12:45:30 +0000 (13:45 +0100)] 
Merge branch 'pg_sigchld' of https://github.com/stoeckmann/util-linux

* 'pg_sigchld' of https://github.com/stoeckmann/util-linux:
  pg: Reset SIGCHLD to default

7 weeks agoMerge branch 'eject_sigchld' of https://github.com/stoeckmann/util-linux
Karel Zak [Mon, 9 Mar 2026 12:43:50 +0000 (13:43 +0100)] 
Merge branch 'eject_sigchld' of https://github.com/stoeckmann/util-linux

* 'eject_sigchld' of https://github.com/stoeckmann/util-linux:
  eject: Reset SIGCHLD to default for wait

7 weeks agoMerge branch 'bugfix' of https://github.com/cuiweixie/util-linux
Karel Zak [Mon, 9 Mar 2026 11:54:14 +0000 (12:54 +0100)] 
Merge branch 'bugfix' of https://github.com/cuiweixie/util-linux

* 'bugfix' of https://github.com/cuiweixie/util-linux:
  fincore: should add break here

7 weeks agoMerge branch 'master-branch-1' of https://github.com/Leefancy/util-linux
Karel Zak [Mon, 9 Mar 2026 11:49:10 +0000 (12:49 +0100)] 
Merge branch 'master-branch-1' of https://github.com/Leefancy/util-linux

* 'master-branch-1' of https://github.com/Leefancy/util-linux:
  The incorrect order of fcntl() parameters resulted in the inability to clear O_NONBLOCK

7 weeks agoMerge branch 'pager_fork_failure' of https://github.com/stoeckmann/util-linux
Karel Zak [Mon, 9 Mar 2026 11:44:31 +0000 (12:44 +0100)] 
Merge branch 'pager_fork_failure' of https://github.com/stoeckmann/util-linux

* 'pager_fork_failure' of https://github.com/stoeckmann/util-linux:
  lib/pager: Translate error message
  lib/pager: Always reset signals before exit
  lib/pager: Properly handle fork error return value

7 weeks agodocs: getopt: improve arg example in getopt-example
Ben Song [Mon, 2 Mar 2026 13:48:25 +0000 (21:48 +0800)] 
docs: getopt: improve arg example in getopt-example

The option `wow!*\?` in original example is not the argument of
`--c-long`. Only `=` separated in optional option is allowed.

[karelzak@redhat.com: - fix tcsh quote style to use backtick-quote
 matching actual script output, remove orphaned comment about
 exclamation mark escaping]

Based-on-patch-by: Ben Song <bensongsyz@gmail.com>
Addresses: https://github.com/util-linux/util-linux/pull/4088
Signed-off-by: Karel Zak <kzak@redhat.com>
7 weeks agoMerge branch 'patch-27' of https://github.com/mariobl/util-linux
Karel Zak [Mon, 9 Mar 2026 11:18:20 +0000 (12:18 +0100)] 
Merge branch 'patch-27' of https://github.com/mariobl/util-linux

* 'patch-27' of https://github.com/mariobl/util-linux:
  Put file types in namei.1.adoc in a table structure
  Convert code blocks into tables
  Remove backticks from table in terminal-colors.d.5.adoc

# Conflicts:
# lib/terminal-colors.d.5.adoc

7 weeks agolslogins: fix broken GROUP column output
Karel Zak [Mon, 9 Mar 2026 11:04:44 +0000 (12:04 +0100)] 
lslogins: fix broken GROUP column output

The condition on COL_GROUP incorrectly checked `!grp->gr_name`
instead of `!user->group`. This caused the GROUP column to always
be empty because when gr_name is non-NULL (normal case) the
assignment was skipped, and when gr_name is NULL, xstrdup() would
crash.

Fixes: https://github.com/util-linux/util-linux/issues/4097
Fixes: 52a6e45bfe5ddee1fed20f2f4f7542cac6bf13c9
Signed-off-by: Karel Zak <kzak@redhat.com>
7 weeks agopam_lastlog2: add -lpam to Makemodule.am
Karel Zak [Mon, 9 Mar 2026 10:25:58 +0000 (11:25 +0100)] 
pam_lastlog2: add -lpam to Makemodule.am

If we don't add this, we don't actually link with PAM; compare the
before and after of pam_lastlog2.so -- without -lpam it does not list
libpam.so.0 as a NEEDED dependency.

Signed-off-by: Morgan Jones <me@numin.it>
Signed-off-by: Karel Zak <kzak@redhat.com>
7 weeks agoterminal-colors.d: (man) do not show 'type' as an optional part
Benno Schulenberg [Sun, 1 Mar 2026 16:45:05 +0000 (17:45 +0100)] 
terminal-colors.d: (man) do not show 'type' as an optional part

That is: remove the square brackets from around 'type' in the synopsis.

Also, do not give the impression that a leading dot by itself is fine
before the 'type'.  That is: a dot is required only when 'name' and/or
'@term' is present.

Also, do not colorize the square brackets as if they were part of the
placeholders.  (And use ++double plus++ passthroughs for the opening
square brackets, to prevent asciidoctor from misinterpreting them.)

Indent the list of file types, for clarity.

And correct or improve some wordings, and remove an inconvenient
blank line in an example.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
7 weeks agofindfs: (man) improve the markup, the layout, and the wording
Benno Schulenberg [Sat, 28 Feb 2026 11:52:45 +0000 (12:52 +0100)] 
findfs: (man) improve the markup, the layout, and the wording

Mark NAME as a placeholder instead of a literal, and rename it to
TAGNAME to make it clearer what "tag" in the description refers to.

Indent the list of possible tags, to make it clearer where the
description continues.

Drop the angle brackets around placeholders -- those are used
in --help output, but in man pages it is just italics.

Also add a missing section header.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
7 weeks agolib/meson: move caputils.c from lib_common to per-binary sources
Karel Zak [Mon, 9 Mar 2026 10:03:54 +0000 (11:03 +0100)] 
lib/meson: move caputils.c from lib_common to per-binary sources

caputils.c is GPL-licensed, and libcommon should only contain LGPL
or public domain code (as stated in lib/Makemodule.am). Move it out
of lib_common_sources and add it directly to the sources of binaries
that use it (unshare, nsenter, setpriv), matching autotools.

Addresses: https://github.com/util-linux/util-linux/issues/4085
Signed-off-by: Karel Zak <kzak@redhat.com>
7 weeks agolib/meson: remove unconditional procfs.c from lib_common_sources
Karel Zak [Mon, 9 Mar 2026 09:31:25 +0000 (10:31 +0100)] 
lib/meson: remove unconditional procfs.c from lib_common_sources

procfs.c was listed in the base lib_common_sources and also added
conditionally under HAVE_OPENAT/HAVE_DIRFD (line 88). In autotools,
procfs.c is only added conditionally. Remove it from the base list
to match autotools and avoid duplication.

Addresses: https://github.com/util-linux/util-linux/issues/4085
Signed-off-by: Karel Zak <kzak@redhat.com>
7 weeks agolib/meson: remove duplicated source files from lib_common_sources
Karel Zak [Mon, 9 Mar 2026 09:30:57 +0000 (10:30 +0100)] 
lib/meson: remove duplicated source files from lib_common_sources

The files idcache.c, randutils.c, md5.c, sha1.c, strutils.c, and
strv.c were listed both in the base lib_common_sources string list
and then appended again via files() objects. Remove them from the
base list since the files() append is needed for the named variables
used by other meson.build files.

Addresses: https://github.com/util-linux/util-linux/issues/4085
Signed-off-by: Karel Zak <kzak@redhat.com>
7 weeks agopg: Reset SIGCHLD to default
Tobias Stoeckmann [Sat, 7 Mar 2026 20:13:21 +0000 (21:13 +0100)] 
pg: Reset SIGCHLD to default

When pg runs a child process, i.e. evaluating an "!" command, it calls
wait to receive status for the child.

If SIGCHLD is ignored, this results in an endless loop. Fix this by
resetting SIGCHLD to default before the any fork() call is performed.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
7 weeks agoThe incorrect order of fcntl() parameters resulted in the inability to clear O_NONBLOCK
Leefancy [Wed, 4 Mar 2026 09:30:12 +0000 (17:30 +0800)] 
The incorrect order of fcntl() parameters resulted in the inability to clear O_NONBLOCK

Signed-off-by: Leefancy <lijian01@kylinos.cn>
7 weeks agoeject: Reset SIGCHLD to default for wait
Tobias Stoeckmann [Fri, 6 Mar 2026 20:58:46 +0000 (21:58 +0100)] 
eject: Reset SIGCHLD to default for wait

If SIGCHLD is ignored, the wait call which waits for the umount command
to finish could fail with -1 and ECHILD. Since its return value is not
checked, the uninitialized status variable would be read, leading to
undefined behavior.

While at it, removed the additionally printed newline from errx message.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
7 weeks agoeject: Fix OOB access with empty argument
Tobias Stoeckmann [Fri, 6 Mar 2026 20:50:09 +0000 (21:50 +0100)] 
eject: Fix OOB access with empty argument

The the supplied argument is an empty string, eject triggers an out of
boundary access due to strlen() - 1 calculation.

Verify that the string is not empty before checking its last character.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
7 weeks agofincore: should add break here
Weixie Cui [Fri, 6 Mar 2026 12:40:08 +0000 (20:40 +0800)] 
fincore: should add break here

7 weeks agoPut file types in namei.1.adoc in a table structure
Mario Blättermann [Thu, 5 Mar 2026 19:53:18 +0000 (20:53 +0100)] 
Put file types in namei.1.adoc in a table structure

7 weeks agolib/pager: Translate error message
Tobias Stoeckmann [Thu, 5 Mar 2026 16:08:58 +0000 (17:08 +0100)] 
lib/pager: Translate error message

Since the error message is not printed by a signal handler anymore, it
can be translated.

Requested-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
7 weeks agolib/pager: Always reset signals before exit
Tobias Stoeckmann [Tue, 3 Mar 2026 17:07:27 +0000 (18:07 +0100)] 
lib/pager: Always reset signals before exit

Just in case another exit handler relies on these signal handlers being
set to default, or to allow users to press ^C and let the program exit
as expected.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
7 weeks agoMerge branch 'mkfs_minix_alarm' of https://github.com/stoeckmann/util-linux
Karel Zak [Thu, 5 Mar 2026 08:54:05 +0000 (09:54 +0100)] 
Merge branch 'mkfs_minix_alarm' of https://github.com/stoeckmann/util-linux

* 'mkfs_minix_alarm' of https://github.com/stoeckmann/util-linux:
  mkfs.minix: Simplify SIGALRM handler

7 weeks agoMerge branch 'PR/portability-hurd' of https://github.com/karelzak/util-linux-work
Karel Zak [Thu, 5 Mar 2026 08:35:54 +0000 (09:35 +0100)] 
Merge branch 'PR/portability-hurd' of https://github.com/karelzak/util-linux-work

* 'PR/portability-hurd' of https://github.com/karelzak/util-linux-work:
  agetty: simplify USE_SYSTEMD ifdef in output_special_char
  agetty: introduce USE_NETLINK to separate netlink from reload
  agetty: guard netlink-related code with AGETTY_RELOAD
  libblkid: guard loop device code with __linux__ in cache
  build-sys: move shells.c to common (non-Linux) sources
  build-sys: move netlink sources from libcommon to agetty

7 weeks agoMerge branch 'PR/lsmem-sysroot-prefix' of https://github.com/karelzak/util-linux...
Karel Zak [Thu, 5 Mar 2026 08:34:48 +0000 (09:34 +0100)] 
Merge branch 'PR/lsmem-sysroot-prefix' of https://github.com/karelzak/util-linux-work

* 'PR/lsmem-sysroot-prefix' of https://github.com/karelzak/util-linux-work:
  lsmem: apply --sysroot prefix to all sysfs paths

7 weeks agolsmem: apply --sysroot prefix to all sysfs paths
Karel Zak [Tue, 3 Mar 2026 09:56:38 +0000 (10:56 +0100)] 
lsmem: apply --sysroot prefix to all sysfs paths

Tests fail on architectures where /sys/module/memory_hotplug/parameters/
memmap_on_memory does not exist (e.g., loong64), because lsmem reads
from the real /sys instead of the --sysroot directory.

 - Route memmap_on_memory read through ul_path API with a local handler
   in print_summary(), so --sysroot prefix is respected.

 - Apply --sysroot prefix to sysmemconfig (/sys/firmware/memory) before
   the memory0 existence check.

 - Fix sysmemconfig memory leak (missing ul_unref_path).

 - Update expected test output (remove "Memmap on memory parameter"
   lines, not available in test dumps).

Reported-by: Chris Hofstaedtler <zeha@debian.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
Tested-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
7 weeks agoConvert code blocks into tables
Mario Blättermann [Wed, 4 Mar 2026 18:24:04 +0000 (19:24 +0100)] 
Convert code blocks into tables

8 weeks agolib/pager: Properly handle fork error return value
Tobias Stoeckmann [Tue, 3 Mar 2026 17:05:20 +0000 (18:05 +0100)] 
lib/pager: Properly handle fork error return value

Most of the code checks for pager_process.pid != 0 to see if a pager is
running. If fork fails and returns -1, pager_process.pid is not 0, too.

This in turn leads to an issue if waitpid is eventually called with -1
as pid, which would wait for all children. Since there are no children,
the wait_for_pager function calls err with an EXIT_FAILURE value.

Properly handle a potential fork error.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
8 weeks agomkfs.minix: Simplify SIGALRM handler
Tobias Stoeckmann [Tue, 3 Mar 2026 17:04:08 +0000 (18:04 +0100)] 
mkfs.minix: Simplify SIGALRM handler

Calling printf is not signal safe and in general there are too many
branches in alarm_intr for what it's used for.

Check the signal flag outside of the handler and print messages when
needed. Also, disable the alarm and reset the signal handling when it's
not needed anymore.

While at it, use correct formatter in printf.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
8 weeks agotools/git-grouped-log: add co-author support
Karel Zak [Tue, 3 Mar 2026 11:52:11 +0000 (12:52 +0100)] 
tools/git-grouped-log: add co-author support

Parse Co-authored-by and Co-Author trailers from commit bodies and
display co-author names alongside the primary author.

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