<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src-test2/usr.bin/stat/stat.c, branch release/8.4.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src-test2/atom?h=release%2F8.4.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src-test2/atom?h=release%2F8.4.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/'/>
<updated>2011-03-05T04:06:12Z</updated>
<entry>
<title>MFC r218535:</title>
<updated>2011-03-05T04:06:12Z</updated>
<author>
<name>Doug Barton</name>
<email>dougb@FreeBSD.org</email>
</author>
<published>2011-03-05T04:06:12Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=95e79e384661a32e890d37140d04f1c55ce1e909'/>
<id>urn:sha1:95e79e384661a32e890d37140d04f1c55ce1e909</id>
<content type='text'>
Synthesize the change from NetBSD's 1.33:

"Do not crash if a date cannot be represented (localtime returning
NULL), use the Epoch value instead."

Obtained from:  njoly@NetBSD.org
</content>
</entry>
<entry>
<title>For stat.c</title>
<updated>2011-01-11T20:08:34Z</updated>
<author>
<name>Doug Barton</name>
<email>dougb@FreeBSD.org</email>
</author>
<published>2011-01-11T20:08:34Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=a6dd3f743a87a748d2442a3f46ed79f126e81140'/>
<id>urn:sha1:a6dd3f743a87a748d2442a3f46ed79f126e81140</id>
<content type='text'>
==========

MFC r216196:

Bring in the change from NetBSD 1.18:

"If using stat (the -L flag) and it fails, fall back to lstat().  It
may be the case that we're examining a broken symlink, and anything is
better than nothing."

The changes in 1.14 through 1.17 were not relevant to us.

Obtained from:	atatat@NetBSD.org

MFC r216202:

Bring in the change from NetBSD 1.22:

"Fix a trivial truncation case, and eliminate a corner case that might
print a nul character."

I am purposely bypassing the following versions:
1.19	A build infrastructure change that does not apply to us
1.20	A feature I am not interested in, but don't object if someone else
	wants to pick it up
1.21	A build infrastructure change that does not apply to us

Obtained from:	atatat@NetBSD.org

MFC r216203:

Bring in a new feature, adding a -f option to readlink to print the path
of the target, similar to realpath(1). See the discussion at:
http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=34662

This brings in the following changes:
1.24
"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 -&gt; %R, as it was already taken) plus
some nits from myself. Thanks!"

Obtained from:	elad@NetBSD.org

1.25
"Fix a segfault when doing 'stat -f %R' on the stdin file handle, instead
fake the filename '(stdin)' like the %N format."

Obtained from:	mlelstv@NetBSD.org

1.27
"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 " -&gt; " in front of the real
path (when you use %SR).

Also, the ?: needs another space."

Obtained from:	atatat@NetBSD.org

I am purposely omitting the following changes:
1.23	A humanize_number(3) clone that should better be implemented by
	actually using humanize_number(3)
1.26	This is the removal of license clause 3 and 4, already handled
	by imp in r203971

MFC 216205:

Bring in the update from NetBSD 1.28:

"Fix WARNS=4 issues (-Wcast-qual -Wsign-compare)"

Because of code differences I had to hand-apply parts of the patch,
so responsibility for errors goes to me.

Obtained from:	lukem@NetBSD.org

MFC 216206:	[ Also applies to Makefile ]

Fix an "unused variable" error that gets us all the way to WARNS=6

MFC 216207:

Bring in the following changes from NetBSD. See the discussion at:
http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=44128

1.29
"Don't printf time_t with %d; fixes PR 44128 from yamt. With this change it
successfully prints mtimes after 2038."

1.30
"Improve previous with comments."

Obtained from:	dholland@NetBSD.org (both)

MFC 216343:

Bring in the change from OpenBSD's 1.14:

"synchronize synopsis and usage; "-l", "-r", "-s" and "-x" are mutually
exclusive; while here, slightly improve spacing in the source code
so it fits on a 80-column display again.

diff greatly improved by martynas@"

Obtained from:	sobrado@OpenBSD.org

MFC 216512:

Bring in the relevant changes from NetBSD's 1.31:

"Use strlcpy, not strncpy, when the desired semantics are strlcpy's
rather than strncpy's."

Note: NetBSD's 1.32 is their adoption of our r216206

Obtained from:	dholland@NetBSD.org

For stat.1
==========

MFC 216197:

Add my own documentation for the change in our r216196, aka NetBSD's 1.18
For -L if stat(2) fails, fall back to lstat(2).

.Dd purposely not bumped because more changes are coming.

MFC 216204:

Bring in the update from NetBSD 1.19, the documentation of readlink -f

"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 -&gt; %R, as it was already taken) plus
some nits from myself. Thanks!"

Obtained from:	elad@NetBSD.org

MFC 216209:

Bring in the change from NetBSD 1.12:

"document default format."

Obtained from:	yamt@NetBSD.org

MFC 216213:

Bring in the changes from NetBSD 1.13 that we did not already have, with
some differences.

"Sort options. Use more mdoc macros. Some nit fixes. Bump date."

Obtained from:	wiz@NetBSD.org

MFC 216215:

Bring in the changes from NetBSD 1.16 that we did not already have.

"Some fixes from jmc@openbsd."

Obtained from:	wiz@NetBSD.org

MFC 216216:

Bring in the change from NetBSD 1.20:

"Make sentence easier to parse. From jsing@openbsd via jmc@openbsd."

Obtained from:	wiz@NetBSD.org

MFC 216218:

Bring in the following changes from NetBSD:

1.21
"Document the flags displayed by the default format, and mention their short
names. From espie@openbsd via jmc@openbsd."

1.24
"Fix three variable names.
From Todd T. Fries via Jason McIntyre."

Obtained from:	wiz@NetBSD.org (previous 2)

1.25
"Be consistent: document the birthtime field of struct stat for
the "B" field specifier."

Obtained from:	reed@NetBSD.org

1.26
"Drop trailing space."

Obtained from:	wiz@NetBSD.org

1.27
"Since we have st_birthtime in struct stat, it is in default display."

Obtained from:	enami@NetBSD.org

Purposely skipping the following revisions:
1.22	NetBSD-specific change
1.23	Removal of license clauses 3 and 4, already handled by imp
	in our r203971

MFC 216219:

Bring in the change from NetBSD 1.28:

"\\ -&gt; \e"

Obtained from:	joerg@NetBSD.org

Bump .Dd because we're now up to date with the latest NetBSD version
</content>
</entry>
<entry>
<title>MFC r203971:</title>
<updated>2011-01-11T20:04:37Z</updated>
<author>
<name>Doug Barton</name>
<email>dougb@FreeBSD.org</email>
</author>
<published>2011-01-11T20:04:37Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=78e9da6df026ea74c3983aa6745d348e36de03de'/>
<id>urn:sha1:78e9da6df026ea74c3983aa6745d348e36de03de</id>
<content type='text'>
The NetBSD Foundation has granted permission to remove clause 3 and 4
from their software.

Obtained from:  NetBSD
</content>
</entry>
<entry>
<title>MFC r207153: stat: Allow -f %Sf to display the file flags symbolically.</title>
<updated>2010-05-01T14:36:04Z</updated>
<author>
<name>Jilles Tjoelker</name>
<email>jilles@FreeBSD.org</email>
</author>
<published>2010-05-01T14:36:04Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=5d05d542eb3d73e52da5e94262d4a3c91bf6b1dd'/>
<id>urn:sha1:5d05d542eb3d73e52da5e94262d4a3c91bf6b1dd</id>
<content type='text'>
PR:		124349
</content>
</entry>
<entry>
<title>Let stat(1) use fdevname(3).</title>
<updated>2009-02-11T20:36:17Z</updated>
<author>
<name>Ed Schouten</name>
<email>ed@FreeBSD.org</email>
</author>
<published>2009-02-11T20:36:17Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=42dc9c5abddbdf7a9734dd8f165e76cbe5748210'/>
<id>urn:sha1:42dc9c5abddbdf7a9734dd8f165e76cbe5748210</id>
<content type='text'>
Because we now have a reliable library function that converts file
descriptors to character device names, let stat(1) use this. This means
it can now do the following:

	$ stat -f %N
	/dev/pts/0

I've changed main() to set file properly, so output() is never called
with file set to NULL.

Approved by:	dougb (older version, still used devname)
</content>
</entry>
<entry>
<title>o Print an octal representation of suid, sgid and sticky bits with -x flag.</title>
<updated>2009-02-11T10:50:26Z</updated>
<author>
<name>Maxim Konovalov</name>
<email>maxim@FreeBSD.org</email>
</author>
<published>2009-02-11T10:50:26Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=df8a2f1a4bb0dcde0d90dd8daeb0722940209424'/>
<id>urn:sha1:df8a2f1a4bb0dcde0d90dd8daeb0722940209424</id>
<content type='text'>
PR:		bin/131569
Submitted by:	Jaakko Heinonen
Reported by:	Yannick Cadin
MFC after:	1 week
</content>
</entry>
<entry>
<title>Resolve conflicts</title>
<updated>2003-10-06T01:55:17Z</updated>
<author>
<name>Doug Barton</name>
<email>dougb@FreeBSD.org</email>
</author>
<published>2003-10-06T01:55:17Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=dad5d4e08c1921346bbc7fb0e59d965c4ad623af'/>
<id>urn:sha1:dad5d4e08c1921346bbc7fb0e59d965c4ad623af</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Import NetBSD's 1.10 version, which includes the ability to display</title>
<updated>2003-05-11T23:02:09Z</updated>
<author>
<name>Doug Barton</name>
<email>dougb@FreeBSD.org</email>
</author>
<published>2003-05-11T23:02:09Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=1cee9d8d65a3ca2e649d62b76e16357a1c3f7f38'/>
<id>urn:sha1:1cee9d8d65a3ca2e649d62b76e16357a1c3f7f38</id>
<content type='text'>
the new inode birthtime field, a few other small cleanups, and
synchronization with our #include &lt;sys/types.h&gt;.

Approved by:	re (bmah)
Obtained from:	Andrew Brown &lt;atatat@NetBSD.org&gt;
</content>
</entry>
<entry>
<title>Adjust the size passed to readlink so that the null termination</title>
<updated>2002-10-25T07:26:36Z</updated>
<author>
<name>Doug Barton</name>
<email>dougb@FreeBSD.org</email>
</author>
<published>2002-10-25T07:26:36Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=7d5b77ef5f07388be1f1ceca12b8aa19c6741fb8'/>
<id>urn:sha1:7d5b77ef5f07388be1f1ceca12b8aa19c6741fb8</id>
<content type='text'>
falls within the range of the path variable.

Cribbed from the latest NetBSD source.

Obtained from:	provos@NetBSD.org
</content>
</entry>
<entry>
<title>I was too conservative with my header changes, so restore some sanity</title>
<updated>2002-08-15T04:58:46Z</updated>
<author>
<name>Doug Barton</name>
<email>dougb@FreeBSD.org</email>
</author>
<published>2002-08-15T04:58:46Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=782ce2878134c6d2b486bf128482355754725c7c'/>
<id>urn:sha1:782ce2878134c6d2b486bf128482355754725c7c</id>
<content type='text'>
via bde. atatat@NetBSD.org made basically the same change in their
version, so bring over their CVS Id which I neglected last time.

Obtained from:	bde, Andrew Brown &lt;atatat@NetBSD.org&gt;
</content>
</entry>
</feed>
