From a42bb540501112505602d5095a20f5cc074f4fef 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 b0c1c6012..d39b6fe5f 100644 --- a/cmd/zfs/zfs_main.c +++ b/cmd/zfs/zfs_main.c @@ -9410,7 +9410,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 35c6c0baf..cd1b61f13 100644 --- a/cmd/zpool/zpool_main.c +++ b/cmd/zpool/zpool_main.c @@ -13781,7 +13781,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); }