du: remove stray whitespace in help text
[oweals/busybox.git] / coreutils / du.c
index 7a6662d1e02fd21f0558fb2aed346b4767feca30..790ff0f8e0304b06db589396ca1979ad81dc16e7 100644 (file)
@@ -31,7 +31,6 @@
 //usage:       IF_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("1024")
 //usage:       IF_NOT_FEATURE_DU_DEFAULT_BLOCKSIZE_1K("512")
 //usage:       " bytes.\n"
-//usage:     "\nOptions:"
 //usage:     "\n       -a      Show file sizes too"
 //usage:     "\n       -L      Follow all symlinks"
 //usage:     "\n       -H      Follow symlinks on command line"
@@ -41,7 +40,7 @@
 //usage:     "\n       -s      Display only a total for each argument"
 //usage:     "\n       -x      Skip directories on different filesystems"
 //usage:       IF_FEATURE_HUMAN_READABLE(
-//usage:     "\n       -h      Sizes in human readable format (e.g., 1K 243M 2G )"
+//usage:     "\n       -h      Sizes in human readable format (e.g., 1K 243M 2G)"
 //usage:     "\n       -m      Sizes in megabytes"
 //usage:       )
 //usage:     "\n       -k      Sizes in kilobytes"
@@ -89,9 +88,10 @@ struct globals {
        dev_t dir_dev;
 } FIX_ALIASING;
 #define G (*(struct globals*)&bb_common_bufsiz1)
+#define INIT_G() do { } while (0)
 
 
-static void print(unsigned long size, const char *filename)
+static void print(unsigned long long size, const char *filename)
 {
        /* TODO - May not want to defer error checking here. */
 #if ENABLE_FEATURE_HUMAN_READABLE
@@ -105,15 +105,15 @@ static void print(unsigned long size, const char *filename)
                size++;
                size >>= 1;
        }
-       printf("%lu\t%s\n", size, filename);
+       printf("%llu\t%s\n", size, filename);
 #endif
 }
 
 /* tiny recursive du */
-static unsigned long du(const char *filename)
+static unsigned long long du(const char *filename)
 {
        struct stat statbuf;
-       unsigned long sum;
+       unsigned long long sum;
 
        if (lstat(filename, &statbuf) != 0) {
                bb_simple_perror_msg(filename);
@@ -190,10 +190,12 @@ static unsigned long du(const char *filename)
 int du_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
 int du_main(int argc UNUSED_PARAM, char **argv)
 {
-       unsigned long total;
+       unsigned long long total;
        int slink_depth_save;
        unsigned opt;
 
+       INIT_G();
+
 #if ENABLE_FEATURE_HUMAN_READABLE
        IF_FEATURE_DU_DEFAULT_BLOCKSIZE_1K(G.disp_hr = 1024;)
        IF_NOT_FEATURE_DU_DEFAULT_BLOCKSIZE_1K(G.disp_hr = 512;)