2 ** dynamically loadable chu driver
4 ** /src/NTP/REPOSITORY/v3/kernel/chuinit.c,v 1.1.1.1 1994/07/11 07:56:25 kardel Exp
6 ** william robertson <rob@agate.berkeley.edu>
11 #include <sys/errno.h>
12 #include <sys/stream.h>
13 #include <sys/syslog.h>
15 #include <sun/openprom.h>
16 #include <sun/vddrv.h>
18 extern int findmod(); /* os/str_io.c */
20 extern struct streamtab chuinfo;
29 xxxinit(function_code, vdp, vdi, vds)
30 unsigned int function_code;
38 switch (function_code) {
41 if (findmod("chu") >= 0) {
42 log(LOG_ERR, "chu stream module already loaded\n");
48 if (i == -1 || fmodsw[i].f_name[0] != '\0')
51 for (j = 0; vd.Drv_name[j] != '\0'; j++) /* XXX check bounds */
52 fmodsw[i].f_name[j] = vd.Drv_name[j];
54 fmodsw[i].f_name[j] = '\0';
55 fmodsw[i].f_str = &chuinfo;
57 vdp->vdd_vdtab = (struct vdlinkage *) &vd;
62 if ((i = findmod(vd.Drv_name)) == -1)
65 fmodsw[i].f_name[0] = '\0';