Bug 261657 - stat(1) patch: Fix error message formatting
Summary: stat(1) patch: Fix error message formatting
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Xin LI
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-01 17:47 UTC by Jamie Landeg-Jones
Modified: 2023-02-01 07:27 UTC (History)
1 user (show)

See Also:


Attachments
patch to stat(1) (300 bytes, patch)
2022-02-01 17:47 UTC, Jamie Landeg-Jones
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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!