summaryrefslogtreecommitdiffstats
path: root/usr.bin/stat
Commit message (Collapse)AuthorAgeFilesLines
* More -Wmissing-variable-declarations fixes.ed2012-10-191-2/+2
| | | | | | | | | | | | | | | | In addition to adding `static' where possible: - bin/date: Move `retval' into extern.h to make it visible to date.c. - bin/ed: Move globally used variables into ed.h. - sbin/camcontrol: Move `verbose' into camcontrol.h and fix shadow warnings. - usr.bin/calendar: Remove unneeded variables. - usr.bin/chat: Make `line' local instead of global. - usr.bin/elfdump: Comment out unneeded function. - usr.bin/rlogin: Use _Noreturn instead of __dead2. - usr.bin/tset: Pull `Ospeed' into extern.h. - usr.sbin/mfiutil: Put global variables in mfiutil.h. - usr.sbin/pkg: Remove unused `os_corres'. - usr.sbin/quotaon, usr.sbin/repquota: Remove unused `qfname'.
* Remove duplicate -l description.brueffer2012-04-221-5/+1
| | | | | Submitted by: Rainer Hurling <rhurlin@gwdg.de> MFC after: 1 week
* Synthesize the change from NetBSD's 1.33:dougb2011-02-111-1/+5
| | | | | | | "Do not crash if a date cannot be represented (localtime returning NULL), use the Epoch value instead." Obtained from: njoly@NetBSD.org
* Bring in the relevant changes from NetBSD's 1.31:dougb2010-12-181-3/+3
| | | | | | | | | "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
* Bring in the change from OpenBSD's 1.14:dougb2010-12-091-2/+4
| | | | | | | | | | "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
* Bring in the change from NetBSD 1.28:dougb2010-12-051-3/+3
| | | | | | | | "\\ -> \e" Obtained from: joerg@NetBSD.org Bump .Dd because we're now up to date with the latest NetBSD version
* Bring in the following changes from NetBSD:dougb2010-12-051-13/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Bring in the change from NetBSD 1.20:dougb2010-12-051-2/+2
| | | | | | "Make sentence easier to parse. From jsing@openbsd via jmc@openbsd." Obtained from: wiz@NetBSD.org
* Bring in the changes from NetBSD 1.16 that we did not already have.dougb2010-12-051-2/+2
| | | | | | "Some fixes from jmc@openbsd." Obtained from: wiz@NetBSD.org
* Bring in the changes from NetBSD 1.13 that we did not already have, withdougb2010-12-051-4/+9
| | | | | | | | some differences. "Sort options. Use more mdoc macros. Some nit fixes. Bump date." Obtained from: wiz@NetBSD.org
* Bring in the change from NetBSD 1.12:dougb2010-12-051-0/+7
| | | | | | "document default format." Obtained from: yamt@NetBSD.org
* Bring in the following changes from NetBSD. See the discussion at:dougb2010-12-051-7/+10
| | | | | | | | | | | | | 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)
* Fix an "unused variable" error that gets us all the way to WARNS=6dougb2010-12-052-4/+3
|
* Bring in the update from NetBSD 1.28:dougb2010-12-051-25/+26
| | | | | | | | | "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
* Bring in the update from NetBSD 1.19, the documentation of readlink -fdougb2010-12-051-4/+17
| | | | | | | | | | "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!" Obtained from: elad@NetBSD.org
* Bring in a new feature, adding a -f option to readlink to print the pathdougb2010-12-051-3/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 -> %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 " -> " 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
* Bring in the change from NetBSD 1.22:dougb2010-12-051-3/+3
| | | | | | | | | | | | | "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
* Add my own documentation for the change in our r216196, aka NetBSD's 1.18dougb2010-12-051-0/+4
| | | | | | For -L if stat(2) fails, fall back to lstat(2). .Dd purposely not bumped because more changes are coming.
* Bring in the change from NetBSD 1.18:dougb2010-12-051-3/+13
| | | | | | | | | | "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
* stat: Allow -f %Sf to display the file flags symbolically.jilles2010-04-242-3/+33
| | | | | | | | | I have changed the patch slightly to show '-' if there are no flags just like ls -ldo does. PR: 124349 Submitted by: Ighighi MFC after: 1 week
* The NetBSD Foundation has granted permission to remove clause 3 and 4imp2010-02-162-14/+0
| | | | | | from their software. Obtained from: NetBSD
* Let stat(1) use fdevname(3).ed2009-02-111-12/+20
| | | | | | | | | | | | | | 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)
* o Print an octal representation of suid, sgid and sticky bits with -x flag.maxim2009-02-111-1/+1
| | | | | | | PR: bin/131569 Submitted by: Jaakko Heinonen Reported by: Yannick Cadin MFC after: 1 week
* The referenced section name is 'Formats', not 'FORMATS'.pjd2008-04-291-1/+1
|
* Add some more examples. It always takes me a long time to find the Sbrian2007-04-271-2/+27
| | | | | | modifier (-t is ignored without it). MFC after: 1 week
* Markup and wording fixes.ru2005-06-141-1/+1
| | | | Approved by: re (blanket)
* Note when 'stat' appeared in FreeBSD.obrien2005-03-281-1/+3
|
* Let bsd.prog.mk set SRCS and MAN to their default values.ru2005-01-281-1/+0
|
* Remove unnecessary SRCS= where could be guessed directly by ourdelphij2005-01-271-1/+0
| | | | | | bsd.*.mk infrasture. Obtained from: ru
* Resolve conflictsdougb2003-10-061-5/+65
|
* Assorted mdoc(7) fixes.ru2003-06-021-74/+126
|
* Markup bits.ru2003-05-211-2/+3
| | | | Approved by: re (blanket)
* Bring in NetBSD's version 1.11, which includes documenation for the newdougb2003-05-111-27/+42
| | | | | | | | inode birthtime display, and quite a bit of mdoc cleanup, which brings it much more in line with our mdoc style. Approved by: re (bmah) Obtained from: Andrew Brown <atatat@NetBSD.org> (content), Grant Beattie <grant@NetBSD.org> (mdoc)
* Import NetBSD's 1.10 version, which includes the ability to displaydougb2003-05-111-5/+11
| | | | | | | | the new inode birthtime field, a few other small cleanups, and synchronization with our #include <sys/types.h>. Approved by: re (bmah) Obtained from: Andrew Brown <atatat@NetBSD.org>
* Adjust the size passed to readlink so that the null terminationdougb2002-10-251-4/+2
| | | | | | | | falls within the range of the path variable. Cribbed from the latest NetBSD source. Obtained from: provos@NetBSD.org
* I was too conservative with my header changes, so restore some sanitydougb2002-08-151-2/+3
| | | | | | | 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 <atatat@NetBSD.org>
* A much better description of the -q option.dougb2002-08-131-5/+10
| | | | Obtained from: Andrew Brown <atatat@NetBSD.org>
* A cooperative effort...dougb2002-08-133-100/+150
| | | | | | | | | | | | | | | | | | | | 1. Update the code to the latest from NetBSD, which includes: * A new command line option to suppress stat(2) errors * Output is now done via stdio * Fixes for bitwise OR'ing of letters 2. Andrew from NetBSD merged in our own Johan's readlink patches. 3. Andrew also merged in some brucifications. I made some small contributions to the header cleanup, and tried to generally improve the overall style(9)'ishness. I also documented the new -q option and added the *LINKS to the Makefile. All responsibility for mistakes in merging the contributions from the above is mine. Obtained from: Andrew Brown <atatat@NetBSD.org>, bde, johan
* Virgin import of NetBSD's stat(1)dougb2002-06-063-0/+1333
OpenPOWER on IntegriCloud