106 #include <sys/systm.h>
107 #include <sys/errno.h>
108 #include <sys/modctl.h>
109
110 extern int dseekneg_flag;
111 extern struct mod_ops mod_driverops;
112 extern struct dev_ops ptc_ops;
113
114 /*
115 * Module linkage information for the kernel.
116 */
117
118 static struct modldrv modldrv = {
119 &mod_driverops, /* Type of module. This one is a pseudo driver */
120 "tty pseudo driver control 'ptc'",
121 &ptc_ops, /* driver ops */
122 };
123
124 static struct modlinkage modlinkage = {
125 MODREV_1,
126 &modldrv,
127 NULL
128 };
129
130 int
131 _init()
132 {
133 int rc;
134
135 if ((rc = mod_install(&modlinkage)) == 0)
136 ptc_init();
137 return (rc);
138 }
139
140
141 int
142 _fini()
143 {
144 int rc;
145
146 if ((rc = mod_remove(&modlinkage)) == 0)
147 ptc_uninit();
|
106 #include <sys/systm.h>
107 #include <sys/errno.h>
108 #include <sys/modctl.h>
109
110 extern int dseekneg_flag;
111 extern struct mod_ops mod_driverops;
112 extern struct dev_ops ptc_ops;
113
114 /*
115 * Module linkage information for the kernel.
116 */
117
118 static struct modldrv modldrv = {
119 &mod_driverops, /* Type of module. This one is a pseudo driver */
120 "tty pseudo driver control 'ptc'",
121 &ptc_ops, /* driver ops */
122 };
123
124 static struct modlinkage modlinkage = {
125 MODREV_1,
126 { &modldrv, NULL }
127 };
128
129 int
130 _init()
131 {
132 int rc;
133
134 if ((rc = mod_install(&modlinkage)) == 0)
135 ptc_init();
136 return (rc);
137 }
138
139
140 int
141 _fini()
142 {
143 int rc;
144
145 if ((rc = mod_remove(&modlinkage)) == 0)
146 ptc_uninit();
|