git: cfffe5cacc55 - stable/14 - pw: Clean up a couple of errx() calls
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 05 Oct 2025 13:13:30 UTC
The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=cfffe5cacc5532fb3d0159e1f3478af340cf7bd0 commit cfffe5cacc5532fb3d0159e1f3478af340cf7bd0 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2025-09-18 22:38:45 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2025-10-05 13:13:00 +0000 pw: Clean up a couple of errx() calls - Remove a stray backslash. - Make an error message fit on one line. No functional change intended. MFC after: 1 week Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. (cherry picked from commit bc69d5dffa21cdf228e481b5502fd0f053d65e6d) --- usr.sbin/pw/pw.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/usr.sbin/pw/pw.c b/usr.sbin/pw/pw.c index fc778b16c7e5..18f1a17ba942 100644 --- a/usr.sbin/pw/pw.c +++ b/usr.sbin/pw/pw.c @@ -143,12 +143,13 @@ main(int argc, char *argv[]) optarg = &argv[1][2]; if (*optarg == '\0') { if (stat(argv[2], &st) != 0) - errx(EX_OSFILE, \ + errx(EX_OSFILE, "no such directory `%s'", argv[2]); if (!S_ISDIR(st.st_mode)) - errx(EX_OSFILE, "`%s' not a " - "directory", argv[2]); + errx(EX_OSFILE, + "`%s' not a directory", + argv[2]); optarg = argv[2]; ++argv; --argc;