Skip to content

Include missing newline in 'man' error#18183

Open
thatch wants to merge 1 commit intoopenzfs:masterfrom
thatch:man-error-newline
Open

Include missing newline in 'man' error#18183
thatch wants to merge 1 commit intoopenzfs:masterfrom
thatch:man-error-newline

Conversation

@thatch
Copy link

@thatch thatch commented Feb 7, 2026

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]#

Motivation and Context

Displays a more readable error in the case where man can't be run. This is my first openzfs contribution and I'm happy to add tests or other changes with some hints about what's appropriate.

Description

How Has This Been Tested?

Only manually, it's a string constant change...

# archzfs zfs-utils
[tim@rygel zfs]$ zpool help foo
couldn't run man program: No such file or directory[tim@rygel zfs]$ 

# local build with change
[tim@rygel zfs]$ ./zpool help foo
couldn't run man program: No such file or directory
[tim@rygel zfs]$

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Quality assurance (non-breaking change which makes the code more robust against bugs)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

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]#
```

Signed-off-by: Tim Hatch <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant