diff options
| author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-04-05 17:19:37 +0000 |
|---|---|---|
| committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-04-05 17:19:37 +0000 |
| commit | e11a01cc34ab024b81ca83fec5182c6a444d4798 (patch) | |
| tree | 1224f2f1e961453dc238a69ec19080743fff27c0 /coreutils | |
| parent | 886f6afc8a570978670f1a9356c9dfa51bb124f9 (diff) | |
| download | busybox-w32-e11a01cc34ab024b81ca83fec5182c6a444d4798.tar.gz busybox-w32-e11a01cc34ab024b81ca83fec5182c6a444d4798.tar.bz2 busybox-w32-e11a01cc34ab024b81ca83fec5182c6a444d4798.zip | |
- include inttypes.h as pointed out by Jason Schoon.
- use shorter boilerplate and switch to USE_FEATURE_STAT_FORMAT while at it.
Diffstat (limited to 'coreutils')
| -rw-r--r-- | coreutils/stat.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/coreutils/stat.c b/coreutils/stat.c index 30a2a625b..57fe3eeba 100644 --- a/coreutils/stat.c +++ b/coreutils/stat.c | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | /* vi:set ts=4:*/ | ||
| 1 | /* | 2 | /* |
| 2 | * stat -- display file or file system status | 3 | * stat -- display file or file system status |
| 3 | * | 4 | * |
| @@ -8,23 +9,11 @@ | |||
| 8 | * Written by Michael Meskes | 9 | * Written by Michael Meskes |
| 9 | * Taken from coreutils and turned into a busybox applet by Mike Frysinger | 10 | * Taken from coreutils and turned into a busybox applet by Mike Frysinger |
| 10 | * | 11 | * |
| 11 | * This program is free software; you can redistribute it and/or modify | 12 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
| 12 | * it under the terms of the GNU General Public License as published by | ||
| 13 | * the Free Software Foundation; either version 2 of the License, or | ||
| 14 | * (at your option) any later version. | ||
| 15 | * | ||
| 16 | * This program is distributed in the hope that it will be useful, | ||
| 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 19 | * General Public License for more details. | ||
| 20 | * | ||
| 21 | * You should have received a copy of the GNU General Public License | ||
| 22 | * along with this program; if not, write to the Free Software | ||
| 23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 24 | * | ||
| 25 | */ | 13 | */ |
| 26 | 14 | ||
| 27 | #include <stdio.h> | 15 | #include <stdio.h> |
| 16 | #include <inttypes.h> | ||
| 28 | #include <sys/types.h> | 17 | #include <sys/types.h> |
| 29 | #include <pwd.h> | 18 | #include <pwd.h> |
| 30 | #include <grp.h> | 19 | #include <grp.h> |
| @@ -540,9 +529,7 @@ int stat_main(int argc, char **argv) | |||
| 540 | int (*statfunc)(char const *, char const *) = do_stat; | 529 | int (*statfunc)(char const *, char const *) = do_stat; |
| 541 | 530 | ||
| 542 | flags = bb_getopt_ulflags(argc, argv, "ftL" | 531 | flags = bb_getopt_ulflags(argc, argv, "ftL" |
| 543 | #ifdef CONFIG_FEATURE_STAT_FORMAT | 532 | USE_FEATURE_STAT_FORMAT("c:", &format) |
| 544 | "c:", &format | ||
| 545 | #endif | ||
| 546 | ); | 533 | ); |
| 547 | 534 | ||
| 548 | if (flags & 1) /* -f */ | 535 | if (flags & 1) /* -f */ |
