aboutsummaryrefslogtreecommitdiff
path: root/coreutils/stat.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'busybox' into mergeRon Yorston2016-11-291-0/+3
|\
| * Convert all coreutils/* applets to "new style" applet definitionsDenys Vlasenko2016-11-231-0/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2016-05-161-2/+3
|\|
| * *: hopefully all setup_common_bufsiz() are in placeDenys Vlasenko2016-04-211-4/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: make bb_common_bufsiz1 1 kbyte, add capability to use bss tail for itDenys Vlasenko2016-04-211-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The config item is FEATURE_USE_BSS_TAIL. When it is off (default): function old new delta read_config 210 228 +18 doCommands 2279 2294 +15 ipneigh_list_or_flush 763 772 +9 ipaddr_list_or_flush 1256 1261 +5 display_process_list 1301 1306 +5 conspy_main 1378 1383 +5 do_lzo_compress 352 355 +3 do_lzo_decompress 565 567 +2 push 46 44 -2 inetd_main 2136 2134 -2 uevent_main 421 418 -3 addLines 97 92 -5 bb_common_bufsiz1 8193 1024 -7169 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 8/5 up/down: 62/-7181) Total: -7119 bytes text data bss dec hex filename 829850 4086 9080 843016 cdd08 busybox_old 829901 4086 1904 835891 cc133 busybox_unstripped FEATURE_USE_BSS_TAIL=y: read_config 210 228 +18 doCommands 2279 2294 +15 ipneigh_list_or_flush 763 772 +9 ipaddr_list_or_flush 1256 1261 +5 display_process_list 1301 1306 +5 conspy_main 1378 1383 +5 do_lzo_compress 352 355 +3 do_lzo_decompress 565 567 +2 inetd_main 2136 2134 -2 bb_common_bufsiz1 8193 - -8193 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 8/1 up/down: 62/-8195) Total: -8133 bytes text data bss dec hex filename 829850 4086 9080 843016 cdd08 busybox_old 829911 4086 880 834877 cbd3d busybox_unstripped FIXME: setup_common_bufsiz() calls are missing. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Update default configurationRon Yorston2015-11-011-1/+0
|/
* stat: make -f optional. This allows to build stat for non-linux systemsDenys Vlasenko2015-10-301-20/+61
| | | | | | | | | function old new delta packed_usage 30761 30706 -55 Based on the patch by Ron Yorston. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* typo fixesManinder Singh2015-05-251-1/+1
| | | | | Signed-off-by: Maninder Singh <maninder1.s@samsung.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* stat: fix printing selinux context and null-dereferenceMichael Gernoth2014-06-271-2/+3
| | | | | | | | | | | | busybox stat tries to always print the selinux context, even if it is not requested which leads to a segmentation fault due to dereferencing a null-pointer. This also changes the format-string used to print the context to so it actually produces useful output. Signed-off-by: Michael Gernoth <michael@gernoth.net> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: introduce and use strftime_[YYYYMMDD]HHMMSS()Denys Vlasenko2013-03-291-1/+1
| | | | | | | | | | | | | | | | | | function old new delta strftime_fmt - 53 +53 strftime_YYYYMMDDHHMMSS - 12 +12 strftime_HHMMSS - 12 +12 human_time 44 43 -1 fmtstr_t 9 - -9 step_time 361 345 -16 watch_main 261 232 -29 ------------------------------------------------------------------------------ (add/remove: 3/1 grow/shrink: 0/3 up/down: 77/-55) Total: 22 bytes text data bss dec hex filename 919203 932 17692 937827 e4f63 busybox_old 919209 932 17692 937833 e4f69 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* whitespace cleanup. no code changesDenys Vlasenko2013-01-141-26/+32
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fix unsafe bb_perror_msg(filename) callsDenys Vlasenko2012-09-271-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* android: fix 'stat', ifdef S_TYPEIS* in coreutiles/stat.cTias Guns2012-06-101-0/+6
| | | | | | | | patch modified from 'BusyBox Patch V1.0 (Vitaly Greck)' https://code.google.com/p/busybox-android/downloads/detail?name=patch_busybox Signed-off-by: Tias Guns <tias@ulyssis.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: remove "Options:" string from help textsDenys Vlasenko2011-06-051-1/+0
| | | | | | | function old new delta packed_usage 28706 28623 -83 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* move help text from include/usage.src.h to coreutils/*.cPere Orga2011-03-311-0/+61
| | | | | Signed-off-by: Pere Orga <gotrunks@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* stat: fix mtime/ctime/atimeEric Lammerts2010-10-301-4/+3
| | | | | | | | If you set CONFIG_FEATURE_STAT_FORMAT=n, two of the three printed times are wrong, because a global buffer is reused. Fix below. Signed-off-by: Eric Lammerts <busybox@lists.lammerts.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: whitespace fixesDenys Vlasenko2010-10-281-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* stat: remove superfluous setXXent() calls, plug memory leakAlexander Shishkin2010-10-211-7/+5
| | | | | | | | function old new delta print_stat 875 865 -10 Signed-off-by: Alexander Shishkin <virtuoso@slind.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: make GNU licensing statement forms more regularDenys Vlasenko2010-08-161-1/+1
| | | | | | | This change retains "or later" state! No licensing _changes_ here, only form is adjusted (article, space between "GPL" and "v2" and so on). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* stat: make output more similar to GNU statSeb2010-06-121-20/+21
| | | | | Signed-off-by: Seb <sbb@tuxfamily.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* stat: get rid on intmax_tDenys Vlasenko2010-02-021-90/+91
| | | | | | | | | | | function old new delta print_it 225 218 -7 print_stat 919 889 -30 print_statfs 370 339 -31 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-68) Total: -68 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: remove a few more cases of argc usage. -89 bytes.Denys Vlasenko2009-11-281-11/+11
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: use "can't" instead of "cannot"Denys Vlasenko2009-11-131-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: mass renaming of USE_XXXX to IF_XXXXDenis Vlasenko2009-04-211-12/+12
| | | | | | and SKIP_XXXX to IF_NOT_XXXX - the second one was especially badly named. It was not skipping anything!
* stat: fix compile breakage (get_f_fsid() is used even if !FEATURE_STAT_FORMAT)Denis Vlasenko2008-11-131-14/+14
|
* stat: make stat -f show filesystem "ID:" as coreutils doesDenis Vlasenko2008-11-111-6/+21
| | | | | print_statfs 358 370 +12
* stat: pointers are not 0L, they are NULLDenis Vlasenko2008-06-271-4/+4
| | | | | man: better error handling
* *: fix fallout from -Wunused-parameterDenis Vlasenko2008-03-171-3/+18
| | | | | | | | | | | | | | | | | | function old new delta bbunpack 358 366 +8 passwd_main 1070 1072 +2 handle_incoming_and_exit 2651 2653 +2 getpty 88 86 -2 script_main 975 972 -3 inetd_main 2036 2033 -3 dname_enc 377 373 -4 make_new_session 474 462 -12 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/5 up/down: 12/-24) Total: -12 bytes text data bss dec hex filename 797429 658 7428 805515 c4a8b busybox_old 797417 658 7428 805503 c4a7f busybox_unstripped
* fixes revealed by randomconfig runDenis Vlasenko2007-10-161-1/+1
|
* add -fvisibility=hidden to CC flags, mark XXX_main functionsDenis Vlasenko2007-10-111-1/+1
| | | | | EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
* stat: code shrink; stop using bss; stop using strncat incorrectlyDenis Vlasenko2007-10-051-94/+97
| | | | | | | | | | | | | | | | | function old new delta printfs - 28 +28 strcatc - 26 +26 human_time 41 44 +3 print_it 229 219 -10 buf 30 - -30 print_statfs 420 358 -62 print_stat 1089 921 -168 ------------------------------------------------------------------------------ (add/remove: 2/1 grow/shrink: 1/3 up/down: 57/-270) Total: -213 bytes text data bss dec hex filename 771105 1029 9552 781686 bed76 busybox_old 770892 1029 9520 781441 bec81 busybox_unstripped
* introduce bb_putchar(). saves ~1800 on uclibc (less on glibc).Denis Vlasenko2007-09-271-3/+3
|
* don't pass argc in getopt32, it's superfluousDenis Vlasenko2007-08-181-1/+1
| | | | | | | | (add/remove: 0/0 grow/shrink: 12/131 up/down: 91/-727) Total: -636 bytes text data bss dec hex filename 773469 1058 11092 785619 bfcd3 busybox_old 772644 1058 11092 784794 bf99a busybox_unstripped
* trylink: produce even more info about final link stageDenis Vlasenko2007-08-121-4/+4
| | | | | | | | | trylink: explain how to modify link and drastically decrease amount of padding (unfortunately, needs hand editing ATM). *: add ALIGN1 / ALIGN2 to global strings and arrays of bytes and shorts size saving: 0.5k
* stat: fix option -Z segv (bug 1454)Denis Vlasenko2007-08-091-5/+11
|
* usage.c: remove reference to busybox.hDenis Vlasenko2007-05-261-1/+1
| | | | | *: s/include "busybox.h"/include "libbb.h"
* style fixesDenis Vlasenko2007-04-131-34/+34
|
* add some missed statics on constant objects.Denis Vlasenko2007-04-081-7/+7
| | | | | | | | | | fix few #ifndef ENABLE_xxx # size busybox_old busybox_unstripped text data bss dec hex filename 677152 2920 18208 698280 aa7a8 busybox_old 676420 2920 18208 697548 aa4cc busybox_unstripped
* - remove superfluous bss user (flags) and manually unswitch some areas:Bernhard Reutner-Fischer2007-04-041-138/+92
| | | | | | text data bss dec hex filename 4517 0 34 4551 11c7 stat.o.oorig 4300 0 30 4330 10ea stat.o
* fix accumulated whitespace and indentation damageDenis Vlasenko2007-03-201-2/+2
|
* selinux support by Yuichi Nakamura <ynakam@hitachisoft.jp> (HitachiSoft)Denis Vlasenko2007-03-101-16/+153
|
* syslogd: fix "readpath bug" by using readlink insteadDenis Vlasenko2007-02-111-2/+2
| | | | libbb: rename xgetcwd and xreadlink
* suppress warnings about easch <applet>_main() havingDenis Vlasenko2007-02-031-0/+1
| | | | no preceding prototype
* httpd: fix cgi-bin/index.cgi support, add example of it,Denis Vlasenko2006-11-211-31/+37
| | | | | stat: fix end-of-line if format is specified (wasn't printing it), fix %z (time) format to match coreutils 6.3
* getopt_ulflags -> getopt32.Denis Vlasenko2006-10-031-1/+1
| | | | | | | | It is impossible to formulate sane ABI based on size of ulong because it can be 32-bit or 64-bit. Basically it means that you cannot portably use more that 32 option chars in one call anyway... Make it explicit.
* Remove bb_ prefixes from xfuncs.c (and a few other places), consolidateRob Landley2006-08-031-13/+1
| | | | | | | | | | things like xasprintf() into xfuncs.c, remove xprint_file_by_name() (it only had one user), clean up lots of #includes... General cleanup pass. What I've been doing for the last couple days. And it conflicts! I've removed httpd.c from this checkin due to somebody else touching that file. It builds for me. I have to catch a bus. (Now you know why I'm looking forward to Mercurial.)
* Standardize on the vi editing directives being on the first line."Robert P. J. Day"2006-07-021-1/+1
|
* - typo: s/derefernce/dereference/gBernhard Reutner-Fischer2006-04-181-2/+2
| | | | Thanks to P.J. Day.
* - use C99 %j format to print intmax.Bernhard Reutner-Fischer2006-04-121-16/+16
| | | | Closes bugs #802 and #743
* - include inttypes.h as pointed out by Jason Schoon.Bernhard Reutner-Fischer2006-04-051-17/+4
| | | | - use shorter boilerplate and switch to USE_FEATURE_STAT_FORMAT while at it.