aboutsummaryrefslogtreecommitdiff
path: root/toys/df.c
diff options
context:
space:
mode:
authorlandley <landley@driftwood>2006-10-05 16:18:03 -0400
committerlandley <landley@driftwood>2006-10-05 16:18:03 -0400
commit4f344e356d2c36c4b1df46917eaef25f82ca79a9 (patch)
treecae824af861d5665b1acf1e4b07de86c256c2d0b /toys/df.c
parentc56215062c961402515daeef8330ed75cd94af29 (diff)
downloadtoybox-4f344e356d2c36c4b1df46917eaef25f82ca79a9.tar.gz
Infrastructure, first drop of toy shell, and a bit of work on df.
Diffstat (limited to 'toys/df.c')
-rw-r--r--toys/df.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/toys/df.c b/toys/df.c
index 05c4b6c4..8901baa5 100644
--- a/toys/df.c
+++ b/toys/df.c
@@ -1,7 +1,25 @@
-/* vi: set ts=4 : */
+/* vi: set sw=4 ts=4: */
+/*
+ * df.c - report free disk space.
+ *
+ * Implemented according to SUSv3:
+ * http://www.opengroup.org/onlinepubs/009695399/utilities/df.html
+ *
+ * usage: df [-k] [-P|-t] [file...]
+ */
+
#include "toys.h"
int df_main(void)
{
- printf("toys.which->name=%s\n",toys.which->name);
+ struct mtab_list *mt, *mtlist;
+
+ //int units = 512;
+ mtlist = getmountlist(1);
+ // Zap overmounts
+ for (mt = mtlist; mt; mt = mt->next) {
+ printf("type=%s dir=%s device=%s\n",mt->type,mt->dir,mt->device);
+ }
+
+ return 0;
}