diff options
author | erik <erik@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2000-04-15 16:34:54 +0000 |
---|---|---|
committer | erik <erik@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2000-04-15 16:34:54 +0000 |
commit | a6c674b94b4d2c6732a58760d9086657d884671b (patch) | |
tree | 140cd30d77342c730afbc1df863bec93c63978a8 /miscutils/makedevs.c | |
parent | c8ca3c6625e1a3f234c3f0a1ab3142179a3e529f (diff) | |
download | busybox-w32-a6c674b94b4d2c6732a58760d9086657d884671b.tar.gz busybox-w32-a6c674b94b4d2c6732a58760d9086657d884671b.tar.bz2 busybox-w32-a6c674b94b4d2c6732a58760d9086657d884671b.zip |
More documentation updates, and minor fixes to make things sync
up with the docs.
-Erik
git-svn-id: svn://busybox.net/trunk/busybox@457 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'miscutils/makedevs.c')
-rw-r--r-- | miscutils/makedevs.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/miscutils/makedevs.c b/miscutils/makedevs.c index 5948bacc8..c8206e020 100644 --- a/miscutils/makedevs.c +++ b/miscutils/makedevs.c | |||
@@ -17,10 +17,18 @@ | |||
17 | #include <sys/stat.h> | 17 | #include <sys/stat.h> |
18 | 18 | ||
19 | static const char makedevs_usage[] = | 19 | static const char makedevs_usage[] = |
20 | "makedevs 0.01 -- Create an entire range of device files\n\n" | 20 | "makedevs NAME TYPE MAJOR MINOR FIRST LAST [s]\n\n" |
21 | "\tmakedevs /dev/ttyS c 4 64 0 63 (ttyS0-ttyS63)\n" | 21 | "Creates a range of block or character special files\n\n" |
22 | 22 | "TYPEs include:\n" | |
23 | "\tmakedevs /dev/hda b 3 0 0 8 s (hda,hda1-hda8)\n"; | 23 | "\tb:\tMake a block (buffered) device.\n" |
24 | "\tc or u:\tMake a character (un-buffered) device.\n" | ||
25 | "\tp:\tMake a named pipe. MAJOR and MINOR are ignored for named pipes.\n\n" | ||
26 | "FIRST specifies the number appended to NAME to create the first device.\n" | ||
27 | "LAST specifies the number of the last item that should be created.\n" | ||
28 | "If 's' is the last argument, the base device is created as well.\n\n" | ||
29 | "For example:\n" | ||
30 | "\tmakedevs /dev/ttyS c 4 66 2 63 -> ttyS2-ttyS63\n" | ||
31 | "\tmakedevs /dev/hda b 3 0 0 8 s -> hda,hda1-hda8\n"; | ||
24 | 32 | ||
25 | int makedevs_main(int argc, char **argv) | 33 | int makedevs_main(int argc, char **argv) |
26 | { | 34 | { |
@@ -38,6 +46,9 @@ int makedevs_main(int argc, char **argv) | |||
38 | char devname[255]; | 46 | char devname[255]; |
39 | char buf[255]; | 47 | char buf[255]; |
40 | 48 | ||
49 | if (argc < 7 || *argv[1]=='-') | ||
50 | usage(makedevs_usage); | ||
51 | |||
41 | switch (type[0]) { | 52 | switch (type[0]) { |
42 | case 'c': | 53 | case 'c': |
43 | mode = S_IFCHR; | 54 | mode = S_IFCHR; |