summaryrefslogtreecommitdiff
path: root/src/stat.c
AgeCommit message (Collapse)Author
2005-05-14Update FSF postal mail address.Jim Meyering
2005-05-14Update FSF postal mail address.Jim Meyering
2005-04-04(usage): Move USAGE_BUILTIN_WARNING to end of --help output.Jim Meyering
2005-04-04(usage): Mention that some shells provide a built-inJim Meyering
function by the same name.
2005-03-28(long_options): Use NULL, not `0'.Jim Meyering
2005-03-12Add a little infrastructure to help prevent future bugs like theJim Meyering
one fixed today. (xstrcat): New function. (print_statfs, print_stat): Add buf_len parameter and convert all uses of strcat to xstrcat. Update callers. (print_it): Call print_func with buf_len parameter.
2005-03-12Invoking stat -c FMT with a lone format directive of %s, %f, %h, %s,Jim Meyering
could cause a buffer overrun error. (print_it): Allocate 2 more bytes, to accommodate our conversion of the stat %s format string to the longer printf %llu one. Patch from Guochun Shi.
2005-02-15(human_fstype): Add case/definition for S_MAGIC_JFSJim Meyering
so that file systems of type `jfs' are recognized as such.
2005-02-15(human_fstype): Add case/definition for S_MAGIC_XFSJim Meyering
so that file systems of type `xfs' are recognized as such.
2005-02-08(STATFS_FRSIZE): New macro.Paul Eggert
(print_statfs): Use it to implement %S. (do_statfs): Change default formats to include %S. (usage): Document %S (versus %s).
2005-02-08(usage): Normalize terminology, capitalization, and sort order toPaul Eggert
match manual. Say that %s is the "Fundamental block size", since that is what POSIX says.
2004-11-17(STATFS): New macro, for portability to Solaris 9.Paul Eggert
(do_statfs): Use it.
2004-09-03(HAVE_STRUCT_STATXFS_F_TYPE): Fix typo that preventedPaul Eggert
it from ever being nonzero. Reported by Pozsar Balazs in: http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00189.html (human_fstype): Add ramfs, squashfs, sysfs. Reported by Pozsar Balazs in: http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00188.html (human_fstype): Return char const *, not char *. Simplify internals a bit, and avoid casts.
2004-08-04(print_stat): Don't assume st_ino / st_dev fits inPaul Eggert
unsigned long; this isn't true for st_ino on Solaris 9.
2004-08-03(G_fail): Remove.Paul Eggert
(print_statfs): Print various gotta-be-nonnegative values using unsigned long int, not long int or int. (do_statfs, do_stat): Return a boolean success flag. (do_stat, main): Use bool for booleans.
2004-06-30(usage, main): Output "file system" rather than "filesystem".Jim Meyering
(long_options, usage): Rename "--filesystem" to "--file-system". But keep the old name around, for compatibility reasons.
2004-06-21(main): Standardize on the diagnostics given when someone givesJim Meyering
too few operands ("missing operand after `xxx'") or too many operands ("extra operand `xxx'"). Include "quote.h" and/or "error.h" if it wasn't already being included.
2004-06-01(print_stat): Update use of xreadlink.Jim Meyering
2004-04-09undo last changeJim Meyering
2004-04-09Don't include "file-type.h", now that system.h does.Jim Meyering
2004-04-04A specified format is no longer automatically newline terminated.Jim Meyering
If you want a newline at the end of your format, use `\n'. (print_it): Don't print a newline at the end of every format. (do_statfs): Add a newline at end of each default format string.
2004-02-05(human_time): Correct merge problem.Jim Meyering
2004-02-05Include "inttostr.h".Jim Meyering
(human_time): Print the date/time as a number of seconds since the epoch if it can't be converted by localtime. This is better than just saying "invalid", and is consistent with what "ls" does. Don't dump core if the year has more than 48 digits; this isn't possible on any contemporary host, but we might as well do it right.
2004-02-05(human_time): Accept time rather than pointer-to-const-time parameter,Jim Meyering
for clarity. All callers changed.
2004-02-02(do_stat): Remove extra trailing newline from default formats.Jim Meyering
2004-02-02Print actual fractional seconds in time stamps, not just `.00000000'.Jim Meyering
(human_time): Add and use new parameter, t_ns. (print_stat): Update callers.
2004-01-21(usage): Use EXIT_SUCCESS, not 0, for clarity.Jim Meyering
2004-01-08(human_fstype): Use %lx, not %x format for `unsigned long'.Jim Meyering
2003-10-18Most .c files (AUTHORS): Revert the WRITTEN_BY/AUTHORS changeJim Meyering
of 2003-09-19. Now, AUTHORS is a comma-separated list of strings. Update the call to parse_long_options so that `AUTHORS, NULL' are the last parameters. * src/true.c (main): Append NULL to version_etc argument list. * src/sys2.h (case_GETOPT_VERSION_CHAR): Likewise.
2003-09-18(WRITTEN_BY): Rename from AUTHORS.Jim Meyering
Begin each WRITTEN_BY string with `Written by ' and end it with `.'. Mark each WRITTEN_BY string as translatable.
2003-08-27(print_it): Avoid buffer overrun that would occurJim Meyering
when the user-specified format string ends with `%'.
2003-08-25(main): Warn about use of deprecated `-l' option.Jim Meyering
2003-08-22(do_stat): For link count at end of line, use %h format,Jim Meyering
instead of %-5h. The latter would make stat emit trailing spaces.
2003-07-23Don't include headers already included by system.h:Jim Meyering
Don't include closeout.h.
2003-07-23Don't include unistd.h or time.h; system.h already does it.Jim Meyering
2003-06-17(main): Call initialize_main.Jim Meyering
2003-06-17Fix for build failure on Ultrix 4.3.Jim Meyering
Include sys/statvfs.h in preference to sys/vfs.h. Include sys/param.h and sys/mount.h on ultrix.
2003-05-26Fix portability problem on FreeBSD5.0: don't includeJim Meyering
<sys/statvfs.h> on systems without HAVE_STRUCT_STATVFS_F_BASETYPE. Use #if/#elif/... cascade so we get only one set of include files.
2003-04-10add commentJim Meyering
2003-04-10(human_fstype) [__linux__]: Append each hex constant fromJim Meyering
fs.h in a comment after the corresponding `case S_MAGIC_...:' statement.
2003-04-10(human_fstype): Handle Linux's devpts.Jim Meyering
2003-04-07Add #include directives for Ultrix 4.4.Jim Meyering
Based on a suggested change from Bert Deknuydt.
2003-03-22D'oh.Jim Meyering
2003-03-22Don't include <sys/sysmacros.h>.Jim Meyering
That is already done via system.h. Otherwise, the multiple inclusion would evoke redefinition warnings from Cray's /bin/cc (Cray Standard C Version 4.0.3 (057126) Mar 22 2003 22:02:28). (human_fstype): Factor some directives `up', out of this function. Cast away `const' to avoid error from Cray's /bin/cc.
2003-03-07(print_it): Use putchar, not fputs, to output a single character.Jim Meyering
2003-03-04(usage): Capitalize consistently.Jim Meyering
2003-02-21(usage): Tweak wording of %B description.Jim Meyering
2003-02-20(usage) [%b]: Refer to %B.Jim Meyering
2003-02-20(print_stat): New format: %B (to print ST_NBLOCKSIZE).Jim Meyering
(usage): Describe it.
2003-02-01(G_fail): New global.Jim Meyering
(human_time): Diagnose failed localtime, not failed nstrftime. (main): Fail if G_fail is set.