Bug 274189 - stat(1) EXAMPLES use of st_mtimespec is incorrect since v1.10
Summary: stat(1) EXAMPLES use of st_mtimespec is incorrect since v1.10
Status: Open
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL: https://github.com/freebsd/freebsd-sr...
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-01 01:33 UTC by Edward.Sanford.Sutton, III
Modified: 2023-10-01 06:21 UTC (History)
1 user (show)

See Also:


Attachments
Replace timespec with time in usr.bin/stat/stat.1 (596 bytes, patch)
2023-10-01 01:33 UTC, Edward.Sanford.Sutton, III
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Edward.Sanford.Sutton, III 2023-10-01 01:33:30 UTC
Created attachment 245346 [details]
Replace timespec with time in usr.bin/stat/stat.1

stat(1) EXAMPLES makes use of st_mtimespec which is not created by -s as the example implies so it fails. st_mtime is included in the output when running `stat -s filename` under both csh and sh but st_mtimespec is not.

The following would be a fix to the manpage to be functional for examples. I also changed the last occurrence of timespec as I don't think it would make sense if that is not the actual field but it could be left if it is desired.

After editing I noticed code seems labeled as coming from NetBSD; it seems they have the change in the examples area (last edits of my patch) but not the other format area (first edit). They have the tool and manpage on v1.46 instead of our v1.28 and I did not look things over further than comparing these specific edits.

It appears that the NetBSD manpage was fixed in v1.15 in 2005 to match the v1.10 program alteration in 2003 saying they changed it because that's what the fields really are.
Comment 1 Graham Perrin 2023-10-01 06:21:23 UTC
^Triage: avoid [tags] in summary lines.

<https://wiki.freebsd.org/Bugzilla/DosAndDonts#dont>