From 64bae56b00dd6c4e038313c4bb38854dbe528765 Mon Sep 17 00:00:00 2001 From: Tim Hatch Date: Mon, 9 Feb 2026 10:19:08 -0800 Subject: [PATCH] Include missing newline in 'man' error Because the `strerror` result doesn't include a newline, we need to add one. Observed on a minimal system that doesn't have `man` installed, which behaves like this before the fix: ``` [root@upper tim]# zpool help import couldn't run man program: No such file or directory[root@upper tim]# ``` Reviewed-by: Alexander Motin Reviewed-by: Brian Behlendorf Signed-off-by: Tim Hatch Closes #18183 --- cmd/zfs/zfs_main.c | 2 +- cmd/zpool/zpool_main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c index 1917a0f39..3941ff58b 100644 --- a/cmd/zfs/zfs_main.c +++ b/cmd/zfs/zfs_main.c @@ -9285,7 +9285,7 @@ zfs_do_help(int argc, char **argv) execlp("man", "man", page, NULL); - fprintf(stderr, "couldn't run man program: %s", strerror(errno)); + fprintf(stderr, "couldn't run man program: %s\n", strerror(errno)); return (-1); } diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c index b1e1b2150..463e3748e 100644 --- a/cmd/zpool/zpool_main.c +++ b/cmd/zpool/zpool_main.c @@ -13782,7 +13782,7 @@ zpool_do_help(int argc, char **argv) (void) execlp("man", "man", page, NULL); - fprintf(stderr, "couldn't run man program: %s", strerror(errno)); + fprintf(stderr, "couldn't run man program: %s\n", strerror(errno)); return (-1); }