117
118 static int
119 doorfs32(int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4,
120 int32_t arg5, int32_t subcode);
121
122 static struct sysent door_sysent32 = {
123 6,
124 SE_ARGC | SE_NOUNLOAD,
125 (int (*)())doorfs32,
126 };
127
128 static struct modlsys modlsys32 = {
129 &mod_syscallops32,
130 "32-bit door syscalls",
131 &door_sysent32
132 };
133 #endif
134
135 static struct modlinkage modlinkage = {
136 MODREV_1,
137 &modlsys,
138 #ifdef _SYSCALL32_IMPL
139 &modlsys32,
140 #endif
141 NULL
142 };
143
144 dev_t doordev;
145
146 extern struct vfs door_vfs;
147 extern struct vnodeops *door_vnodeops;
148
149 int
150 _init(void)
151 {
152 static const fs_operation_def_t door_vfsops_template[] = {
153 NULL, NULL
154 };
155 extern const fs_operation_def_t door_vnodeops_template[];
156 vfsops_t *door_vfsops;
157 major_t major;
158 int error;
159
160 mutex_init(&door_knob, NULL, MUTEX_DEFAULT, NULL);
161 if ((major = getudev()) == (major_t)-1)
162 return (ENXIO);
163 doordev = makedevice(major, 0);
164
165 /* Create a dummy vfs */
166 error = vfs_makefsops(door_vfsops_template, &door_vfsops);
167 if (error != 0) {
168 cmn_err(CE_WARN, "door init: bad vfs ops");
169 return (error);
170 }
171 VFS_INIT(&door_vfs, door_vfsops, NULL);
172 door_vfs.vfs_flag = VFS_RDONLY;
173 door_vfs.vfs_dev = doordev;
|
117
118 static int
119 doorfs32(int32_t arg1, int32_t arg2, int32_t arg3, int32_t arg4,
120 int32_t arg5, int32_t subcode);
121
122 static struct sysent door_sysent32 = {
123 6,
124 SE_ARGC | SE_NOUNLOAD,
125 (int (*)())doorfs32,
126 };
127
128 static struct modlsys modlsys32 = {
129 &mod_syscallops32,
130 "32-bit door syscalls",
131 &door_sysent32
132 };
133 #endif
134
135 static struct modlinkage modlinkage = {
136 MODREV_1,
137 { &modlsys,
138 #ifdef _SYSCALL32_IMPL
139 &modlsys32,
140 #endif
141 NULL
142 }
143 };
144
145 dev_t doordev;
146
147 extern struct vfs door_vfs;
148 extern struct vnodeops *door_vnodeops;
149
150 int
151 _init(void)
152 {
153 static const fs_operation_def_t door_vfsops_template[] = {
154 { NULL, { NULL } }
155 };
156 extern const fs_operation_def_t door_vnodeops_template[];
157 vfsops_t *door_vfsops;
158 major_t major;
159 int error;
160
161 mutex_init(&door_knob, NULL, MUTEX_DEFAULT, NULL);
162 if ((major = getudev()) == (major_t)-1)
163 return (ENXIO);
164 doordev = makedevice(major, 0);
165
166 /* Create a dummy vfs */
167 error = vfs_makefsops(door_vfsops_template, &door_vfsops);
168 if (error != 0) {
169 cmn_err(CE_WARN, "door init: bad vfs ops");
170 return (error);
171 }
172 VFS_INIT(&door_vfs, door_vfsops, NULL);
173 door_vfs.vfs_flag = VFS_RDONLY;
174 door_vfs.vfs_dev = doordev;
|