This fixes lash so it handles environment variable expansion, regardless
[oweals/busybox.git] / df.c
diff --git a/df.c b/df.c
index 7a24fedd05912da3585771fed881c74b7b63fb76..ebee4d607dc4f166eaa2bc6957c8cc6128a1305c 100644 (file)
--- a/df.c
+++ b/df.c
  *
  */
 
-#include "busybox.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <mntent.h>
 #include <sys/vfs.h>
 #include <getopt.h>
+#include "busybox.h"
 
 extern const char mtab_file[]; /* Defined in utility.c */
 #ifdef BB_FEATURE_HUMAN_READABLE
@@ -85,7 +85,7 @@ extern int df_main(int argc, char **argv)
        int opt = 0;
        int i = 0;
 
-       while ((opt = getopt(argc, argv, "?"
+       while ((opt = getopt(argc, argv, 
 #ifdef BB_FEATURE_HUMAN_READABLE
        "hm"
 #endif
@@ -100,7 +100,8 @@ extern int df_main(int argc, char **argv)
 #else
                        case 'k': break;
 #endif
-                       case '?': goto print_df_usage; break;
+                       default:
+                                         show_usage();
                }
        }
 
@@ -118,7 +119,7 @@ extern int df_main(int argc, char **argv)
                for(i = optind; i < argc; i++)
                {
                        if ((mountEntry = find_mount_point(argv[i], mtab_file)) == 0) {
-                               error_msg("%s: can't find mount point.\n", argv[i]);
+                               error_msg("%s: can't find mount point.", argv[i]);
                                status = EXIT_FAILURE;
                        } else if (!df(mountEntry->mnt_fsname, mountEntry->mnt_dir))
                                status = EXIT_FAILURE;
@@ -141,10 +142,6 @@ extern int df_main(int argc, char **argv)
        }
 
        return status;
-
-print_df_usage:
-    usage(df_usage);
-    return(FALSE);
 }
 
 /*