aboutsummaryrefslogtreecommitdiff
path: root/toys/toylist.h
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2007-01-14 20:20:06 -0500
committerRob Landley <rob@landley.net>2007-01-14 20:20:06 -0500
commit055cfcbe5b0534c700b30216f54336b7581f7be4 (patch)
tree8c62c700db81dc09b8d9f7c79c504651dff3acd2 /toys/toylist.h
parent3388f4c4de628702ba77e2fec941c809877ad576 (diff)
downloadtoybox-055cfcbe5b0534c700b30216f54336b7581f7be4.tar.gz
Add start of mke2fs/gene2fs, and some other stuff I've been working on.
Diffstat (limited to 'toys/toylist.h')
-rw-r--r--toys/toylist.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/toys/toylist.h b/toys/toylist.h
index 6c5059f1..258df47f 100644
--- a/toys/toylist.h
+++ b/toys/toylist.h
@@ -22,11 +22,25 @@
struct df_data {
struct arg_list *fstype;
+
long units;
};
+struct mke2fs_data {
+ long blocksize;
+ long bytes_per_inode;
+ long inodes;
+ long reserved_percent;
+
+ int fsfd, noseek;
+};
+
+// "E:jJ:L:m:O:"
+#define MKE2FS_OPTSTRING "Fnqm:N:i:b:"
+
union toy_union {
struct df_data df;
+ struct mke2fs_data mke2fs;
} toy;
#define TOYFLAG_USR (1<<0)
@@ -47,7 +61,7 @@ extern struct toy_list {
// List of all the applets toybox can provide.
-// This one is out of order on purpose.
+// This one is out of order on purpose: it's the first element in the array.
NEWTOY(toybox, NULL, 0)
@@ -58,6 +72,7 @@ USE_TOYSH(NEWTOY(cd, NULL, TOYFLAG_NOFORK))
USE_DF(NEWTOY(df, "Pkt*a", TOYFLAG_USR|TOYFLAG_SBIN))
USE_TOYSH(NEWTOY(exit, NULL, TOYFLAG_NOFORK))
USE_HELLO(NEWTOY(hello, NULL, TOYFLAG_NOFORK|TOYFLAG_USR))
+USE_MKE2FS(NEWTOY(mke2fs, MKE2FS_OPTSTRING, TOYFLAG_SBIN))
USE_ONEIT(NEWTOY(oneit, "+p<1", TOYFLAG_SBIN))
USE_PWD(NEWTOY(pwd, NULL, TOYFLAG_BIN))
USE_TOYSH(OLDTOY(sh, toysh, "c:i", TOYFLAG_BIN))