2 ** dynamically loadable chu driver
4 ** william robertson <rob@agate.berkeley.edu>
10 #include <sys/stream.h>
11 #include <sys/syslog.h>
13 #include <sun/openprom.h>
14 #include <sun/vddrv.h>
16 extern int findmod(); /* os/str_io.c */
18 extern struct streamtab chuinfo;
27 xxxinit(function_code, vdp, vdi, vds)
28 unsigned int function_code;
36 switch (function_code) {
39 if (findmod("chu") >= 0) {
40 log(LOG_ERR, "chu stream module already loaded\n");
46 if (i == -1 || fmodsw[i].f_name[0] != '\0')
49 for (j = 0; vd.Drv_name[j] != '\0'; j++) /* XXX check bounds */
50 fmodsw[i].f_name[j] = vd.Drv_name[j];
52 fmodsw[i].f_name[j] = '\0';
53 fmodsw[i].f_str = &chuinfo;
55 vdp->vdd_vdtab = (struct vdlinkage *) &vd;
60 if ((i = findmod(vd.Drv_name)) == -1)
63 fmodsw[i].f_name[0] = '\0';