mrg
97ee1e16ff
rework the previous to only apply if !HOSTPROG
2019-02-04 10:03:16 +00:00
mrg
a5ca97c6e5
apply -Wno-error=implicit-fallthrough on files that have fallthru
...
comments but are missed by the current checker.
2019-02-04 09:51:47 +00:00
mrg
e79f0588d7
avoid a potential buffer truncation.
2019-02-04 08:07:33 +00:00
kre
3777c939b3
Handle the new %f (as an addition to the strftime format - -t arg)
...
correctly, in particular %%f does not contain the %f format, and like
all strftime conversions, %f can occur more than once (not that it is
likely to happen, but just in case...)
2017-09-21 22:53:19 +00:00
kre
79b3cfa2ed
KNF, and since this gets compiled as a tool, avoid C99 declarations.
2017-09-21 18:50:08 +00:00
kre
ac205bb2d4
Set the default time format for linux mode (-x) in the correct place,
...
so it only applies to -x (in particular, not to -s) and only if another
time format has not been explicitly selected (earlier in the arg list).
With luck, this will make lots of tests, which depended upon "stat -s"
actually generating correct sh assignment statements, go back to working again.
2017-09-20 17:45:25 +00:00
wiz
74d5645f3a
whitespace fixes, use Xr.
2017-09-20 08:57:02 +00:00
christos
c5fdb5719f
- add the sticky bits to mode
...
- fix linux Birth for the havenots
code review via email from @@@
2017-09-20 01:23:37 +00:00
christos
952c61b290
- if st_dev/st_rdev == NODEV print -1 instead of unsigned
...
- update to the latest linux stat(1) format for -x (kind of)
- add the ability to display nanoseconds, like linux does
- change u_intX_t -> uintX_t
2017-09-19 21:45:28 +00:00
wiz
01869ca4d2
Remove workaround for ancient HTML generation code.
2017-07-03 21:28:48 +00:00
snj
fc99b6a4d6
Change some standard exit status text to ".Ex -std"
...
From Eitan Adler in PR bin/47790.
2014-04-13 01:45:34 +00:00
dsl
44483cabc1
Unset HAVE_DEVNAME for tools build.
...
config only checks for the symbol in libc, we need the correct prototype.
Which is excluded even on NetBSD (_NETBSD_SOURCE isn't defined in stdlib.h).
2013-01-03 13:28:41 +00:00
wiz
c7ee419f37
Bump date for previous. Remove trailing whitespace.
2012-12-03 07:49:21 +00:00
erh
740a124173
Honor the -t option to set the time format when running stat -s.
...
Document the format used by -s on the man page.
2012-12-02 21:13:07 +00:00
apb
64d2b8e0ba
Use vis(3) encoding when a string format is modified by the '#' flag.
...
Also bump copyright years.
2011-09-22 20:23:55 +00:00
apb
9438a85a85
More corrections to format compatibility between stat(1), find(1) -ls,
...
and ls(1) -lT.
2011-09-16 14:32:53 +00:00
wiz
8438689645
Remove unnecessary Ns.
2011-09-16 13:33:13 +00:00
apb
229948abdb
Anothe difference in output format: stat -f "%Z" does not add any
...
space in "major,minor" for device nodes, whereas both "ls -l" and
"find -ls" add at least one space.
2011-09-16 11:06:27 +00:00
apb
7f5f7e4b90
Add examples of formats for stat(1) to simulate "find -ls" and "ls -lTd".
2011-09-15 19:56:35 +00:00
joerg
fb1e3f6f7d
static + __dead
2011-09-06 18:31:22 +00:00
christos
9590e2915d
document non-literal format strings
2011-08-17 13:22:33 +00:00
christos
c544446f26
Add verbose mode for readlink.
2011-02-16 23:08:29 +00:00
njoly
d1860447da
Do not crash if a date cannot be represented (localtime returning
...
NULL), use the Epoch value instead.
2011-01-15 22:54:10 +00:00
dholland
c79b866358
Don't pass unused argument. From Doug Barton.
2010-12-16 05:42:14 +00:00
dholland
f0a79c06c5
Use strlcpy, not strncpy, when the desired semantics are strlcpy's
...
rather than strncpy's.
2010-12-16 05:30:16 +00:00
dholland
436ec2bec5
Improve previous with comments.
2010-11-25 04:33:30 +00:00
dholland
09bec75330
Don't printf time_t with %d; fixes PR 44128 from yamt. With this change it
...
successfully prints mtimes after 2038.
2010-11-24 22:57:53 +00:00
joerg
a3d484cd9e
\\ -> \e
2010-04-05 21:25:01 +00:00
enami
fc5eb1b7ac
Since we have st_birthtime in struct stat, it is in default display.
2010-03-11 21:37:01 +00:00
lukem
b33c816619
Fix WARNS=4 issues (-Wcast-qual -Wsign-compare)
2009-04-13 23:02:36 +00:00
wiz
a6a4761c6a
Drop trailing space.
2008-11-07 16:49:45 +00:00
reed
a798b8c1a1
Be consistent: document the birthtime field of struct stat for
...
the "B" field specifier.
2008-11-07 15:33:31 +00:00
wiz
1f8562f538
Fix three variable names.
...
From Todd T. Fries via Jason McIntyre.
2008-10-20 08:37:25 +00:00
atatat
23a609536c
The ofmt variable is actually a bit mask (not the character that was
...
in the format string) so that we can "or" it with the bits in the
formats variable. This fixes the missing " -> " in front of the real
path (when you use %SR).
Also, the ?: needs another space.
2008-05-16 17:58:33 +00:00
martin
11a6dbe728
Convert TNF licenses to new 2 clause variant
2008-04-30 13:10:46 +00:00
martin
ce099b4099
Remove clause 3 and 4 from TNF licenses
2008-04-28 20:22:51 +00:00
mlelstv
5c1a4dd94c
Fix a segfault when doing 'stat -f %R' on the stdin file handle, instead
...
fake the filename '(stdin)' like the %N format.
2008-02-09 09:18:07 +00:00
atatat
e1aff854df
Put back the NetBSD tag
2007-11-10 03:12:10 +00:00
wiz
ed200f5855
Document the flags displayed by the default format, and mention their short
...
names. From espie@openbsd via jmc@openbsd.
2007-11-07 23:01:33 +00:00
wiz
e2d8a15c15
Make sentence easier to parse. From jsing@openbsd via jmc@openbsd.
2007-11-07 22:27:50 +00:00
elad
2a7d09e7cd
PR/34662: martijnb at atlas dot ipv6 dot stack dot nl: readlink doesn't
...
grok -f, and there's no alternative (+fix)
Patch applied with minor tweak (%y -> %R, as it was already taken) plus
some nits from myself. Thanks!
2006-10-07 10:41:50 +00:00
wiz
7cb5118cfd
Sort SEE ALSO. Drop trailing space.
2005-06-26 10:16:46 +00:00
atatat
277396bd87
Bend the 'L', 'M', and 'H' modifiers to work on the size, whereby it
...
is rounded to the nearest kilobyte, megabyte, or gigabyte.
Implemented at lukem's request since some things can't deal with
overly large numbers when files are really large.
Have to do something like humanize_number(3), but that interface isn't
really what I'm looking for. I think. More examination required.
2005-06-23 03:13:24 +00:00
atatat
fab1a5fa39
Fix a trivial truncation case, and eliminate a corner case that might
...
print a nul character.
2005-04-22 03:36:48 +00:00
wiz
3c0fa0f019
Some fixes from jmc@openbsd.
2005-04-04 13:34:40 +00:00
jmc
2afa8931db
Now that tools/compat provides a check, make sure st_birthtimensec exists
...
before using it
2005-01-13 00:53:14 +00:00
yamt
075d5146c6
correct examples.
2005-01-08 03:46:05 +00:00
atatat
fa01c2e835
Add "dirname"- and "basename"-like functionality to stat(1) by way of
...
the "high" and "low" selectors on the filename.
2004-12-31 03:24:31 +00:00
wiz
d05a042013
Sort options. Use more mdoc macros. Some nit fixes. Bump date.
2004-09-01 23:26:10 +00:00
yamt
1575138bfb
document default format.
2004-09-01 22:18:20 +00:00