Commit 722c9e9b authored by Claes Sjofors's avatar Claes Sjofors

rt_rtt qcomonly, user argument removed

parent 17da3024
......@@ -47,7 +47,7 @@ int rtt_initialize( char *username,
char *password,
char *commandfile,
char *mainmenu_title);
void rtt_usage();
int rtt_parse( char *string,
char *parse_char,
......
......@@ -337,6 +337,15 @@ int rtt_init_state_table()
return RTT__SUCCESS;
}
void rtt_usage()
{
printf( "\nrt_rtt Runtime Terminal Tool.\n\n"
"Arguments:\n"
" username password [commandfile] [RttConfig-object] [menu-title]\n\n"
" -h Show this help.\n"
" qcomonly Attach qcom, not gdh.\n\n");
}
/*************************************************************************
*
* Name: rtt_initialize()
......@@ -363,11 +372,11 @@ int rtt_initialize( char *username,
qio_assign( "stdin", (int *) &rtt_chn);
if ( strcmp( username, "NONETH_SYS") == 0) {
if ( strcmp( username, "noneth") == 0) {
noneth = 1;
rtt_priv = RTT_PRV_SYS;
}
else if ( strcmp( username, "QCOMONLY") == 0) {
else if ( strcmp( username, "qcomonly") == 0) {
noneth = 1;
qcom_only = 1;
rtt_priv = RTT_PRV_SYS;
......
......@@ -388,7 +388,15 @@ for ( i = 0; i < rtt_args; i++) { \
strncpy( rtt_arg[i], argv[i+1], sizeof(rtt_arg[i]));\
rtt_toupper( rtt_arg[i], rtt_arg[i]); \
} \
if ( argc >= 3 ) { \
if ( argc >= 2 && strcmp( argv[1], "qcomonly") == 0)\
strcpy( username, argv[1]); \
if ( argc >= 2 && strcmp( argv[1], "noneth") == 0)\
strcpy( username, argv[1]); \
else if ( argc >= 2 && strcmp( argv[1], "-h") == 0) { \
rtt_usage(); \
exit(0); \
} \
else if ( argc >= 3 ) { \
strcpy( username, argv[1]); \
rtt_toupper( username, username); \
strcpy( password, argv[2]); \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment