summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authortg <tg@FreeBSD.org>2001-07-31 11:25:52 +0000
committertg <tg@FreeBSD.org>2001-07-31 11:25:52 +0000
commit255f93776505f9f1353ce290ba85b0f7a4f5f29b (patch)
treef37cebcc5b89205c20926640b188e984bf395f59 /usr.bin
parent63673e8c2d382b58de7eaaa3456539096b78c46f (diff)
downloadFreeBSD-src-255f93776505f9f1353ce290ba85b0f7a4f5f29b.zip
FreeBSD-src-255f93776505f9f1353ce290ba85b0f7a4f5f29b.tar.gz
Sort options, remove unknown option 'f'.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/doscmd/doscmd.c135
1 files changed, 67 insertions, 68 deletions
diff --git a/usr.bin/doscmd/doscmd.c b/usr.bin/doscmd/doscmd.c
index 864a647..b087327 100644
--- a/usr.bin/doscmd/doscmd.c
+++ b/usr.bin/doscmd/doscmd.c
@@ -510,15 +510,8 @@ do_args(int argc, char *argv[])
FILE *fp;
char *col;
- while ((c = getopt (argc, argv, "234Oc:TkCIEGMPRLAU:S:HDtzvVxXYfbri:o:p:d:")) != -1) {
+ while ((c = getopt(argc, argv, "234AbCc:Dd:EGHIi:kLMOo:Pp:RrS:TtU:vVxXYz")) != -1) {
switch (c) {
- case 'd':
- if ((fp = fopen(optarg, "w")) != 0) {
- debugf = fp;
- setbuf (fp, NULL);
- } else
- perror(optarg);
- break;
case '2':
debug_flags |= D_TRAPS2;
break;
@@ -528,9 +521,16 @@ do_args(int argc, char *argv[])
case '4':
debug_flags |= D_DEBUGIN;
break;
- case 'O':
- debugf = stdout;
- setbuf (stdout, NULL);
+ case 'A':
+ debug_flags |= D_TRAPS | D_ITRAPS;
+ for (c = 0; c < 256; ++c)
+ debug_set(c);
+ break;
+ case 'b':
+ booting = 1;
+ break;
+ case 'C':
+ debug_flags |= D_DOSCALL;
break;
case 'c':
if ((capture_fd = creat(optarg, 0666)) < 0) {
@@ -538,6 +538,30 @@ do_args(int argc, char *argv[])
quit(1);
}
break;
+ case 'D':
+ debug_flags |= D_DISK | D_FILE_OPS;
+ break;
+ case 'd':
+ if ((fp = fopen(optarg, "w")) != 0) {
+ debugf = fp;
+ setbuf (fp, NULL);
+ } else
+ perror(optarg);
+ break;
+ case 'E':
+ debug_flags |= D_EXEC;
+ break;
+ case 'G':
+ debug_flags |= D_VIDEO;
+ break;
+ case 'H':
+ debug_flags |= D_HALF;
+ break;
+ case 'I':
+ debug_flags |= D_ITRAPS;
+ for (c = 0; c < 256; ++c)
+ debug_set(c);
+ break;
case 'i':
i = 1;
if ((col = strchr(optarg, ':')) != 0) {
@@ -550,6 +574,19 @@ do_args(int argc, char *argv[])
while (i-- > 0)
define_input_port_handler(p++, inb_traceport);
break;
+ case 'k':
+ kargs.debug = 1;
+ break;
+ case 'L':
+ debug_flags |= D_PRINTER;
+ break;
+ case 'M':
+ debug_flags |= D_MEMORY;
+ break;
+ case 'O':
+ debugf = stdout;
+ setbuf (stdout, NULL);
+ break;
case 'o':
i = 1;
if ((col = strchr(optarg, ':')) != 0) {
@@ -562,6 +599,9 @@ do_args(int argc, char *argv[])
while (i-- > 0)
define_output_port_handler(p++, outb_traceport);
break;
+ case 'P':
+ debug_flags |= D_PORT;
+ break;
case 'p':
i = 1;
if ((col = strchr(optarg, ':')) != 0) {
@@ -576,87 +616,46 @@ do_args(int argc, char *argv[])
define_output_port_handler(p++, outb_port);
}
break;
-
+ case 'R':
+ debug_flags |= D_REDIR;
+ break;
case 'r':
raw_kbd = 1;
break;
- case 'I':
- debug_flags |= D_ITRAPS;
- for (c = 0; c < 256; ++c)
- debug_set(c);
- break;
- case 'k':
- kargs.debug = 1;
+ case 'S':
+ debug_flags |= D_TRAPS | D_ITRAPS;
+ debug_set(strtol(optarg, 0, 0));
break;
case 'T':
timer_disable = 1;
break;
- case 'E':
- debug_flags |= D_EXEC;
- break;
- case 'G':
- debug_flags |= D_VIDEO;
- break;
- case 'C':
- debug_flags |= D_DOSCALL;
+ case 't':
+ tmode = 1;
break;
- case 'M':
- debug_flags |= D_MEMORY;
+ case 'U':
+ debug_unset(strtol(optarg, 0, 0));
break;
- case 'P':
- debug_flags |= D_PORT;
+ case 'V':
+ vflag = 1;
break;
- case 'R':
- debug_flags |= D_REDIR;
+ case 'v':
+ debug_flags |= D_TRAPS | D_ITRAPS | D_HALF | 0xff;
break;
case 'X':
debug_flags |= D_XMS;
break;
- case 'Y':
- debug_flags |= D_EMS;
- break;
- case 'L':
- debug_flags |= D_PRINTER;
- break;
- case 'A':
- debug_flags |= D_TRAPS|D_ITRAPS;
- for (c = 0; c < 256; ++c)
- debug_set(c);
- break;
- case 'U':
- debug_unset(strtol(optarg, 0, 0));
- break;
- case 'S':
- debug_flags |= D_TRAPS|D_ITRAPS;
- debug_set(strtol(optarg, 0, 0));
- break;
- case 'H':
- debug_flags |= D_HALF;
- break;
case 'x':
#ifdef NO_X
fatal("X11 support not compiled in.\n");
#endif
xmode = 1;
break;
- case 't':
- tmode = 1;
+ case 'Y':
+ debug_flags |= D_EMS;
break;
case 'z':
zflag = 1;
break;
- case 'D':
- debug_flags |= D_DISK | D_FILE_OPS;
- break;
- case 'v':
- debug_flags |= D_TRAPS | D_ITRAPS | D_HALF | 0xff;
- break;
- case 'V':
- vflag = 1;
- break;
- case 'b':
- booting = 1;
- break;
default:
usage ();
}
OpenPOWER on IntegriCloud