pathins fix
This commit is contained in:
18
map.c
18
map.c
@@ -458,23 +458,29 @@ int func_path(int argc, char *argv[], int mode)
|
|||||||
uint8 drvstr[22];
|
uint8 drvstr[22];
|
||||||
NWPATH nwpath;
|
NWPATH nwpath;
|
||||||
int rc;
|
int rc;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
fprintf(stderr, "PATHDBG mode=%d argc=%d", mode, argc);
|
||||||
|
for (i = 0; i < argc; i++)
|
||||||
|
fprintf(stderr, " argv[%d]='%s'", i, argv[i]);
|
||||||
|
fprintf(stderr, "\n");
|
||||||
|
|
||||||
/*
|
|
||||||
* PATH/PATHINS/PATHDEL need their own parser. The old parse_argv()
|
|
||||||
* rejects common login-script syntax such as:
|
|
||||||
* PATHINS S1:=SYS:PUBLIC
|
|
||||||
* MAP INS S1:=SYS:PUBLIC
|
|
||||||
*/
|
|
||||||
if (argc < 2) {
|
if (argc < 2) {
|
||||||
show_search("");
|
show_search("");
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = parse_pathins_arg(drvstr, &nwpath, argc, argv, mode);
|
rc = parse_pathins_arg(drvstr, &nwpath, argc, argv, mode);
|
||||||
|
fprintf(stderr, "PATHDBG parse rc=%d drv0=%u drv1=%u path='%s'\n",
|
||||||
|
rc, drvstr[0], drvstr[1], rc ? "" : nwpath.path);
|
||||||
|
|
||||||
if (!rc) {
|
if (!rc) {
|
||||||
int result=0;
|
int result=0;
|
||||||
if (*(nwpath.path) || mode==1)
|
if (*(nwpath.path) || mode==1)
|
||||||
result=set_search_native(drvstr, &nwpath, mode);
|
result=set_search_native(drvstr, &nwpath, mode);
|
||||||
|
|
||||||
|
fprintf(stderr, "PATHDBG set result=%d\n", result);
|
||||||
|
|
||||||
if (mode != 1)
|
if (mode != 1)
|
||||||
show_search(drvstr);
|
show_search(drvstr);
|
||||||
return(result);
|
return(result);
|
||||||
|
|||||||
Reference in New Issue
Block a user