172
173 static void *estate = NULL;
174 static const char *Snm = "ses";
175 static const char *Str = "%s\n";
176 static const char *efl = "copyin/copyout EFAULT @ line %d";
177 static const char *fail_msg = "%stransport failed: reason '%s': %s";
178
179
180
181 /*
182 * autoconfiguration routines.
183 */
184
185 static struct modldrv modldrv = {
186 &mod_driverops,
187 "SCSI Enclosure Services",
188 &ses_dev_ops
189 };
190
191 static struct modlinkage modlinkage = {
192 MODREV_1, &modldrv, NULL
193 };
194
195
196 int
197 _init(void)
198 {
199 int status;
200 status = ddi_soft_state_init(&estate, sizeof (ses_softc_t), 0);
201 if (status == 0) {
202 if ((status = mod_install(&modlinkage)) != 0) {
203 ddi_soft_state_fini(&estate);
204 }
205 }
206 return (status);
207 }
208
209 int
210 _fini(void)
211 {
212 int status;
|
172
173 static void *estate = NULL;
174 static const char *Snm = "ses";
175 static const char *Str = "%s\n";
176 static const char *efl = "copyin/copyout EFAULT @ line %d";
177 static const char *fail_msg = "%stransport failed: reason '%s': %s";
178
179
180
181 /*
182 * autoconfiguration routines.
183 */
184
185 static struct modldrv modldrv = {
186 &mod_driverops,
187 "SCSI Enclosure Services",
188 &ses_dev_ops
189 };
190
191 static struct modlinkage modlinkage = {
192 MODREV_1, { &modldrv, NULL }
193 };
194
195
196 int
197 _init(void)
198 {
199 int status;
200 status = ddi_soft_state_init(&estate, sizeof (ses_softc_t), 0);
201 if (status == 0) {
202 if ((status = mod_install(&modlinkage)) != 0) {
203 ddi_soft_state_fini(&estate);
204 }
205 }
206 return (status);
207 }
208
209 int
210 _fini(void)
211 {
212 int status;
|