/*
* Mini df implementation for busybox
*
- * Copyright (C) 1999,2000 by Lineo, inc.
+ * Copyright (C) 1999,2000,2001 by Lineo, inc.
* Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org>
* based on original code by (I think) Bruce Perens <bruce@pixar.com>.
*
*
*/
-#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
int opt = 0;
int i = 0;
- while ((opt = getopt(argc, argv, "?"
+ while ((opt = getopt(argc, argv,
#ifdef BB_FEATURE_HUMAN_READABLE
"hm"
#endif
#else
case 'k': break;
#endif
- case '?': goto print_df_usage; break;
+ default:
+ show_usage();
}
}
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;
}
return status;
-
-print_df_usage:
- usage(df_usage);
- return(FALSE);
}
/*