Bug 261657

Summary: stat(1) patch: Fix error message formatting
Product: Base System Reporter: Jamie Landeg-Jones <jamie>
Component: binAssignee: Xin LI <delphij>
Status: Closed FIXED    
Severity: Affects Only Me CC: delphij
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch to stat(1) none

Description Jamie Landeg-Jones 2022-02-01 17:47:34 UTC
Created attachment 231498 [details]
patch to stat(1)

Another fix for stat(1) !

Simple one again. Note the output of typical commands when there is an error:

$                                                                                                                                                                                                      $ ls none
ls: none: No such file or directory                                                                                                                                                                    $ cat none
cat: none: No such file or directory                                                                                                                                                                   $ stat none
stat: none: stat: No such file or directory

"stat" includes its name twice.

patch attached to fix it!
Comment 1 commit-hook freebsd_committer freebsd_triage 2023-01-29 22:39:28 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=37399d5bcf67c6d68e30a34ce2df30e0964d46d9

commit 37399d5bcf67c6d68e30a34ce2df30e0964d46d9
Author:     Jamie Landeg-Jones <jamie@catflap.org>
AuthorDate: 2023-01-29 22:37:25 +0000
Commit:     Xin LI <delphij@FreeBSD.org>
CommitDate: 2023-01-29 22:37:25 +0000

    usr.bin/stat: Fix error message formatting.

    PR:             bin/261657
    MFC after:      3 days

 usr.bin/stat/stat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-02-01 07:25:45 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=9eea81e59641df1a5a45dbe06628081bc4bb7bad

commit 9eea81e59641df1a5a45dbe06628081bc4bb7bad
Author:     Jamie Landeg-Jones <jamie@catflap.org>
AuthorDate: 2023-01-29 22:37:25 +0000
Commit:     Xin LI <delphij@FreeBSD.org>
CommitDate: 2023-02-01 07:24:52 +0000

    usr.bin/stat: Fix error message formatting.

    PR:             bin/261657

    (cherry picked from commit 37399d5bcf67c6d68e30a34ce2df30e0964d46d9)

 usr.bin/stat/stat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 3 commit-hook freebsd_committer freebsd_triage 2023-02-01 07:26:47 UTC
A commit in branch stable/12 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=b2ffd03bbb3e9cfb0cb9a6995a0e23351d2004fb

commit b2ffd03bbb3e9cfb0cb9a6995a0e23351d2004fb
Author:     Jamie Landeg-Jones <jamie@catflap.org>
AuthorDate: 2023-01-29 22:37:25 +0000
Commit:     Xin LI <delphij@FreeBSD.org>
CommitDate: 2023-02-01 07:25:36 +0000

    usr.bin/stat: Fix error message formatting.

    PR:             bin/261657

    (cherry picked from commit 37399d5bcf67c6d68e30a34ce2df30e0964d46d9)

 usr.bin/stat/stat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 4 Xin LI freebsd_committer freebsd_triage 2023-02-01 07:27:15 UTC
Committed, thanks!