summaryrefslogtreecommitdiff
path: root/src/stat.c
AgeCommit message (Collapse)Author
2006-07-09(print_it): Don't assume char is unsigned.Paul Eggert
2006-04-17(human_access): Use (new) filemodestring rather thanPaul Eggert
(old) mode_string, so that we get more file types right, at least in theory. Adjust to filemode changes.
2006-04-12(USE_STATVFS): New macro.Paul Eggert
Include <sys/statvfs.h> and use statvfs only if USE_STATVFS. (NAMEMAX_FORMAT): define a bit more clearly, now that the statvfs-using code is a bit more regular.
2005-12-15(print_it): Properly handle a backslash at theJim Meyering
end of a --printf format string. Reported by Paul Eggert.
2005-12-15revert behavior of --format=FMT (-c)Jim Meyering
add new option: --printf=FMT (isodigit, octtobin, hextobin): Define. (PRINTF_OPTION): Define. (interpret_backslash_escapes, trailing_delim): New globals. (usage): Document them. Alphabetize on long option names. (print_esc_char): New function. (print_it): Rewrite, in order to handle backslash escapes. (main): Handle new option. Set globals for --format, too.
2005-10-15(main): Remove --link -l options.Jim Meyering
You can use --dereference (-L) instead.
2005-09-16Include stat-time.h, and use its functions instead of the obsoletePaul Eggert
TIMESPEC_NS macro.
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