<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/src/stat.c, branch v8.6</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v8.6</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v8.6'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2010-10-05T15:07:58Z</updated>
<entry>
<title>stat: drop %C support when printing file system details</title>
<updated>2010-10-05T15:07:58Z</updated>
<author>
<name>Eric Blake</name>
<email>eblake@redhat.com</email>
</author>
<published>2010-10-05T15:02:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=b7459696dca96015688e82c81eaefad756b63ddc'/>
<id>urn:sha1:b7459696dca96015688e82c81eaefad756b63ddc</id>
<content type='text'>
* src/stat.c (print_statfs, usage): Drop %C, since it applies to
files, not file systems.
(out_file_context): Match style of other out_* functions.
(print_stat): Update caller.
* doc/coreutils.texi (stat invocation): Document %C.
* NEWS: Document the change.
</content>
</entry>
<entry>
<title>stat: adjust the printing of SELinux context</title>
<updated>2010-10-05T10:00:10Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2010-10-05T07:40:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=77063bf819f44bbae4dd057e75d23ee72c728a63'/>
<id>urn:sha1:77063bf819f44bbae4dd057e75d23ee72c728a63</id>
<content type='text'>
* src/stat.c (default_format): Don't print SELinux context
when in file system (-f) mode, as the context is associated
with the file, not the file system.
Fix logic inversion, so that in terse mode, %C is included
only when is_selinux_enabled and not vice versa.
</content>
</entry>
<entry>
<title>stat: print SELinux context when available</title>
<updated>2010-10-01T21:27:27Z</updated>
<author>
<name>Eric Blake</name>
<email>eblake@redhat.com</email>
</author>
<published>2010-10-01T17:54:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=7a5ecae996a6a18ee9bdaf0ad50782247c53ec7b'/>
<id>urn:sha1:7a5ecae996a6a18ee9bdaf0ad50782247c53ec7b</id>
<content type='text'>
* src/stat.c (default_format): Include context when present.
* NEWS: Update blurb explaining the replacement for -Z.
</content>
</entry>
<entry>
<title>stat: optimize and translate default format strings</title>
<updated>2010-10-01T21:24:39Z</updated>
<author>
<name>Eric Blake</name>
<email>eblake@redhat.com</email>
</author>
<published>2010-10-01T17:44:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=2c14ec962a46ae53d39149112ae6902ed771d497'/>
<id>urn:sha1:2c14ec962a46ae53d39149112ae6902ed771d497</id>
<content type='text'>
Yes, this patch intentionally leaks the results of default_format(),
since it is called only twice, and since the results are in scope
until main() exits.  Not worth the extra code to pacify valgrind.

* src/stat.c (main): Hoist default format computation out of loop.
(do_statfs, do_stat): Move default format generation...
(default_format): ...into new function.  Allocate the result in
pieces, rather than repeating mostly-similar chunks.  Allow
translation of verbose format.  Pass a second format to do_stat,
for the one aspect of the default format that is conditional on
file type.
* NEWS: Document the translation aspect.
</content>
</entry>
<entry>
<title>stat: print timestamps to full resolution</title>
<updated>2010-10-01T16:43:41Z</updated>
<author>
<name>Eric Blake</name>
<email>eblake@redhat.com</email>
</author>
<published>2010-09-30T22:42:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=9069af45e691d1252c727da66aa4f3f3c7f1ea29'/>
<id>urn:sha1:9069af45e691d1252c727da66aa4f3f3c7f1ea29</id>
<content type='text'>
* src/stat.c (epoch_time): New function.
(print_stat): Use it for %[WXYZ].
* NEWS: Document this.
* tests/touch/60-seconds: Adjust test to match.
* tests/misc/stat-birthtime: Likewise.
</content>
</entry>
<entry>
<title>stat: support printing birthtime</title>
<updated>2010-10-01T16:43:25Z</updated>
<author>
<name>Eric Blake</name>
<email>eblake@redhat.com</email>
</author>
<published>2010-09-30T22:31:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=abe5c1f9bc09753fd79e7a121c8ecfa917dfaddb'/>
<id>urn:sha1:abe5c1f9bc09753fd79e7a121c8ecfa917dfaddb</id>
<content type='text'>
* src/stat.c (print_stat): New %w and %W formats.
(do_stat): Include %w in default format.
(usage): Document new specifiers.
* doc/coreutils.texi (stat invocation): Likewise.
* NEWS: Likewise.
</content>
</entry>
<entry>
<title>stat: add %m to output the mount point for a file</title>
<updated>2010-08-27T21:16:10Z</updated>
<author>
<name>Aaron Burgemeister</name>
<email>dajoker@gmail.com</email>
</author>
<published>2010-07-16T01:54:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=ddf6fb8686b1ed6a26d5f1c76a642d0fb5fe7ba7'/>
<id>urn:sha1:ddf6fb8686b1ed6a26d5f1c76a642d0fb5fe7ba7</id>
<content type='text'>
* src/find-mount-point.c: A new file refactoring
find_mount_point() out from df.c
* src/find-mount-point.h: Likewise.
* src/df.c: Use the new find-mount-point module.
* src/stat.c (print_stat): Handle the new %m format.
(find_bind_mount): A new function to
return the bind mount for a file if any.
(out_mount_mount): Print the bind mount for a file, or else
the standard mount point given by the find-mount-point module.
(usage): Document the %m format directive.
* src/Makefile.am: Reference the refactored find-mount-point.c
* po/POTFILES.in: Add find_mount_point.c to the translation list
* doc/coreutils.texi (stat invocation): Document %m,
and how it may differ from the mount point that df outputs.
* test/misc/stat-mount: A new test to correlate mount points
output from df and stat.
* tests/Makefile.am: Reference the new test.
* NEWS: Mention the new feature
* THANKS: Add the author

Signed-off-by: Pádraig Brady &lt;P@draigBrady.com&gt;
</content>
</entry>
<entry>
<title>stat: fix a small memory leak with %N</title>
<updated>2010-08-23T06:15:24Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2010-08-18T23:53:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=2ed90c4c9dca45ca266f4d5d25b6bac982765004'/>
<id>urn:sha1:2ed90c4c9dca45ca266f4d5d25b6bac982765004</id>
<content type='text'>
* src/stat.c (print_stat): Free the buffer returned
from areadlink_with_size().
</content>
</entry>
<entry>
<title>stat: getfilecon failure now evokes nonzero exit status</title>
<updated>2010-07-05T15:39:51Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2010-07-05T15:18:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=d5427265e30522cfda098bb82ad3d4bff0a0d2bd'/>
<id>urn:sha1:d5427265e30522cfda098bb82ad3d4bff0a0d2bd</id>
<content type='text'>
Add comments and adjust interfaces to allow low-level failure
to propagate out to callers.
* src/stat.c (out_file_context): Return bool, not void,
so we can tell callers about failure.
(print_statfs, print_stat, print_it): Propagate failure to caller.
(do_statfs): Propagate print_it failure to caller.
(do_stat): Likewise.
I nearly forgot to update do_stat to propagate print_it failure,
and it compiled just fine in spite of that.  To prevent possibility
of a repeat, I've marked each function that returns non-void with
ATTRIBUTE_WARN_UNUSED_RESULT.
</content>
</entry>
<entry>
<title>stat: remove support for deprecated --context (-Z) option</title>
<updated>2010-06-22T09:42:34Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2010-06-22T09:41:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=13f323786c0317347b448ae365fec95856dc0b8d'/>
<id>urn:sha1:13f323786c0317347b448ae365fec95856dc0b8d</id>
<content type='text'>
* src/stat.c (main): Remove support for the --context (-Z) option.
In upstream releases this option has always been a no-op.  It was
first ignored for compatibility, and since the June 2008 commit,
574f7614 (coreutils-7.0), its use has evoked a warning.
* NEWS (Changes in behavior): Mention it.
</content>
</entry>
</feed>
