69 |
|
char *dname; |
70 |
|
{ |
71 |
|
extern char *progname, *octname; |
72 |
< |
char *devargv[3]; |
72 |
> |
char *id; |
73 |
|
register int i; |
74 |
|
|
75 |
< |
devargv[0] = dname; |
76 |
< |
devargv[1] = octname!=NULL ? octname : progname; |
77 |
< |
devargv[2] = NULL; |
75 |
> |
id = octname!=NULL ? octname : progname; |
76 |
|
/* check device table */ |
77 |
|
for (i = 0; devtable[i].name; i++) |
78 |
|
if (!strcmp(dname, devtable[i].name)) |
79 |
< |
if ((dev = (*devtable[i].init)(devargv[1])) == NULL) { |
79 |
> |
if ((dev = (*devtable[i].init)(dname, id)) == NULL) { |
80 |
|
sprintf(errmsg, "cannot initialize %s", dname); |
81 |
|
error(USER, errmsg); |
82 |
|
} else |
83 |
|
return; |
84 |
|
/* not there, try exec */ |
85 |
< |
if ((dev = comm_init(devargv)) == NULL) { |
85 |
> |
if ((dev = comm_init(dname, id)) == NULL) { |
86 |
|
sprintf(errmsg, "cannot start device \"%s\"", dname); |
87 |
|
error(USER, errmsg); |
88 |
|
} |