aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-04-23 06:26:38 +0000
committerMike Frysinger <vapier@gentoo.org>2005-04-23 06:26:38 +0000
commit9b5f71ec029776e21bda6c4c61e6b463fd3a2314 (patch)
tree962bf98157f322d70e5c0fdd7fce5ef6865bbd3d /include
parent84ab267e226407ee402eff10aaf8239ed684de77 (diff)
downloadbusybox-w32-9b5f71ec029776e21bda6c4c61e6b463fd3a2314.tar.gz
busybox-w32-9b5f71ec029776e21bda6c4c61e6b463fd3a2314.tar.bz2
busybox-w32-9b5f71ec029776e21bda6c4c61e6b463fd3a2314.zip
stat implementation based upon coreutils
Diffstat (limited to 'include')
-rw-r--r--include/applets.h3
-rw-r--r--include/usage.h57
2 files changed, 60 insertions, 0 deletions
diff --git a/include/applets.h b/include/applets.h
index 5ecdf7949..957bc2018 100644
--- a/include/applets.h
+++ b/include/applets.h
@@ -542,6 +542,9 @@
542#ifdef CONFIG_START_STOP_DAEMON 542#ifdef CONFIG_START_STOP_DAEMON
543 APPLET_ODDNAME("start-stop-daemon", start_stop_daemon_main, _BB_DIR_SBIN, _BB_SUID_NEVER, start_stop_daemon) 543 APPLET_ODDNAME("start-stop-daemon", start_stop_daemon_main, _BB_DIR_SBIN, _BB_SUID_NEVER, start_stop_daemon)
544#endif 544#endif
545#ifdef CONFIG_STAT
546 APPLET(stat, stat_main, _BB_DIR_BIN, _BB_SUID_NEVER)
547#endif
545#ifdef CONFIG_STRINGS 548#ifdef CONFIG_STRINGS
546 APPLET(strings, strings_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER) 549 APPLET(strings, strings_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)
547#endif 550#endif
diff --git a/include/usage.h b/include/usage.h
index cc2aa3274..8941e1841 100644
--- a/include/usage.h
+++ b/include/usage.h
@@ -2320,6 +2320,63 @@
2320 "\n\t-q|--quiet\t\t\tbe quiet" \ 2320 "\n\t-q|--quiet\t\t\tbe quiet" \
2321 "\n\t-s|--signal <signal>\t\tsignal to send (default TERM)" 2321 "\n\t-s|--signal <signal>\t\tsignal to send (default TERM)"
2322 2322
2323#ifdef CONFIG_FEATURE_STAT_FORMAT
2324# define USAGE_STAT_FORMAT(a) a
2325#else
2326# define USAGE_STAT_FORMAT(a)
2327#endif
2328#define stat_trivial_usage \
2329 "[OPTION] FILE..."
2330#define stat_full_usage \
2331 "display file (default) or filesystem status.\n\n" \
2332 "Options:\n" \
2333 USAGE_STAT_FORMAT("\t-c fmt\tuse the specified format\n") \
2334 "\t-f\tdisplay filesystem status\n" \
2335 "\t-L,-l\tdereference links\n" \
2336 "\t-t\tdisplay info in terse form\n" \
2337 USAGE_STAT_FORMAT( \
2338 "\nValid format sequences for files:\n" \
2339 " %a Access rights in octal\n" \
2340 " %A Access rights in human readable form\n" \
2341 " %b Number of blocks allocated (see %B)\n" \
2342 " %B The size in bytes of each block reported by %b\n" \
2343 " %d Device number in decimal\n" \
2344 " %D Device number in hex\n" \
2345 " %f Raw mode in hex\n" \
2346 " %F File type\n" \
2347 " %g Group ID of owner\n" \
2348 " %G Group name of owner\n" \
2349 " %h Number of hard links\n" \
2350 " %i Inode number\n" \
2351 " %n File name\n" \
2352 " %N Quoted file name with dereference if symbolic link\n" \
2353 " %o I/O block size\n" \
2354 " %s Total size, in bytes\n" \
2355 " %t Major device type in hex\n" \
2356 " %T Minor device type in hex\n" \
2357 " %u User ID of owner\n" \
2358 " %U User name of owner\n" \
2359 " %x Time of last access\n" \
2360 " %X Time of last access as seconds since Epoch\n" \
2361 " %y Time of last modification\n" \
2362 " %Y Time of last modification as seconds since Epoch\n" \
2363 " %z Time of last change\n" \
2364 " %Z Time of last change as seconds since Epoch\n" \
2365 "\nValid format sequences for file systems:\n" \
2366 " %a Free blocks available to non-superuser\n" \
2367 " %b Total data blocks in file system\n" \
2368 " %c Total file nodes in file system\n" \
2369 " %d Free file nodes in file system\n" \
2370 " %f Free blocks in file system\n" \
2371 " %i File System ID in hex\n" \
2372 " %l Maximum length of filenames\n" \
2373 " %n File name\n" \
2374 " %s Block size (for faster transfers)\n" \
2375 " %S Fundamental block size (for block counts)\n" \
2376 " %t Type in hex\n" \
2377 " %T Type in human readable form\n" \
2378 )
2379
2323#define strings_trivial_usage \ 2380#define strings_trivial_usage \
2324 "[-afo] [-n length] [file ... ]" 2381 "[-afo] [-n length] [file ... ]"
2325#define strings_full_usage \ 2382#define strings_full_usage \