From 33f49efa5348c9d5c11a35e1a6d0298fcd66a8a3 Mon Sep 17 00:00:00 2001 From: Thomas Osterried Date: Mon, 16 Apr 2007 21:05:06 +0000 Subject: Fix possible irritation because arguments were "-xxx". Retained backward compatibility, but prefered arguments are now without '-'. --- ax25/axctl.8 | 18 +++++++++--------- ax25/axctl.c | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) (limited to 'ax25') diff --git a/ax25/axctl.8 b/ax25/axctl.8 index 3189aa8..2de5151 100644 --- a/ax25/axctl.8 +++ b/ax25/axctl.8 @@ -2,7 +2,7 @@ .SH NAME axctl \- Configure/Kill running AX.25 connections. .SH SYNOPSIS -.B axctl [-v] port dest src -window|-t1|-t2|-t3|-n2|-idle|-paclen|-kill [parm] +.B axctl [-v] port dest src window|t1|t2|t3|n2|idle|paclen|kill [parm] .SH DESCRIPTION .LP The @@ -23,33 +23,33 @@ invokation of .BI \-v Displays the version number. .TP 20 -.BI "\-window window" +.BI "window window" Sets the window size for the AX.25 connection. .TP 20 -.BI "\-t1 t1\-timeout" +.BI "t1 t1\-timeout" Sets the initial T1 timeout value for the AX.25 connection, the value is given in seconds. .TP 20 -.BI "\-t2 t2\-timeout" +.BI "t2 t2\-timeout" Sets the T2 timeout value for the AX.25 connection, the value is given in seconds. .TP 20 -.BI "\-t3 t3\-timeout" +.BI "t3 t3\-timeout" Sets the T3 timeout value for the AX.25 connected, the value is given in seconds. .TP 20 -.BI "\-n2 n2\-count" +.BI "n2 n2\-count" Sets the maximum number of tries for the AX.25 connection. .TP 20 -.BI "\-idle idle-timeout" +.BI "idle idle-timeout" Sets the value for the idle timer for the AX.25 connection, the value is in minutes. .TP 20 -.BI "\-paclen paclength" +.BI "paclen paclength" Sets the maximum packet length that may be transmitted on the AX.25 connection. .TP 20 -.BI "\-kill" +.BI "kill" Will abort an existing AX.25 connection. .SH FILES .LP diff --git a/ax25/axctl.c b/ax25/axctl.c index 42be556..6f94650 100644 --- a/ax25/axctl.c +++ b/ax25/axctl.c @@ -38,7 +38,7 @@ int main(int argc, char **argv) } if (argc < 5) { - fprintf(stderr, "Usage: axctl [-v] port dest src -t1|-t2|-t3|-n2|-paclen|-idle|-window|-maxq|-kill parm\n"); + fprintf(stderr, "Usage: axctl [-v] port dest src t1|t2|t3|n2|paclen|idle|window|maxq|kill [parm]\n"); return 1; } @@ -64,7 +64,7 @@ int main(int argc, char **argv) return 1; } - if (strcmp(argv[4], "-kill") == 0) { + if (strcmp(argv[4], "kill") == 0 || strcmp(argv[4], "-kill") == 0) { ax25_ctl.cmd = AX25_KILL; ax25_ctl.arg = 0; } else { @@ -74,19 +74,19 @@ int main(int argc, char **argv) } ax25_ctl.arg = atoi(argv[5]); - if (strcmp(argv[4], "-t1") == 0) + if (strcmp(argv[4], "t1") == 0 || strcmp(argv[4], "-t1") == 0) ax25_ctl.cmd = AX25_T1; - else if (strcmp(argv[4], "-t2") == 0) + else if (strcmp(argv[4], "t2") == 0 || strcmp(argv[4], "-t2") == 0) ax25_ctl.cmd = AX25_T2; - else if (strcmp(argv[4], "-t3") == 0) + else if (strcmp(argv[4], "t3") == 0 || strcmp(argv[4], "-t3") == 0) ax25_ctl.cmd = AX25_T3; - else if (strcmp(argv[4], "-idle") == 0) + else if (strcmp(argv[4], "idle") == 0 || strcmp(argv[4], "-idle") == 0) ax25_ctl.cmd = AX25_IDLE; - else if (strcmp(argv[4], "-n2") == 0) + else if (strcmp(argv[4], "n2") == 0 || strcmp(argv[4], "-n2") == 0) ax25_ctl.cmd = AX25_N2; - else if (strcmp(argv[4], "-window") == 0) + else if (strcmp(argv[4], "window") == 0 || strcmp(argv[4], "-window") == 0) ax25_ctl.cmd = AX25_WINDOW; - else if (strcmp(argv[4], "-paclen") == 0) + else if (strcmp(argv[4], "paclen") == 0 || strcmp(argv[4], "-paclen") == 0) ax25_ctl.cmd = AX25_PACLEN; } -- cgit v1.2.3