82 |
{ |
{ |
83 |
char *start = arg; |
char *start = arg; |
84 |
char *end; |
char *end; |
85 |
|
|
86 |
rdev = strtoul (start, &end, 0); |
rdev = strtoul (start, &end, 0); |
87 |
if (*end == ',') |
if (*end == ',') |
88 |
{ |
{ |
152 |
error_t err; |
error_t err; |
153 |
|
|
154 |
term_bucket = ports_create_bucket (); |
term_bucket = ports_create_bucket (); |
155 |
|
|
156 |
trivfs_add_control_port_class (&tty_cntl_class); |
trivfs_add_control_port_class (&tty_cntl_class); |
157 |
trivfs_add_control_port_class (&pty_cntl_class); |
trivfs_add_control_port_class (&pty_cntl_class); |
158 |
trivfs_add_protid_port_class (&tty_class); |
trivfs_add_protid_port_class (&tty_class); |
209 |
default: |
default: |
210 |
/* Should not happen. */ |
/* Should not happen. */ |
211 |
error (1, 0, "Unknown terminal type"); |
error (1, 0, "Unknown terminal type"); |
212 |
|
/*NOTREACHED*/ |
213 |
|
return 1; |
214 |
} |
} |
215 |
|
|
216 |
task_get_bootstrap_port (mach_task_self (), &bootstrap); |
task_get_bootstrap_port (mach_task_self (), &bootstrap); |
217 |
|
|
218 |
if (bootstrap == MACH_PORT_NULL) |
if (bootstrap == MACH_PORT_NULL) |
219 |
error (1, 0, "Must be started as a translator"); |
error (1, 0, "Must be started as a translator"); |
220 |
|
|
277 |
term_mode |= S_IFCHR | S_IROOT; |
term_mode |= S_IFCHR | S_IROOT; |
278 |
|
|
279 |
inputq = create_queue (256, QUEUE_LOWAT, QUEUE_HIWAT); |
inputq = create_queue (256, QUEUE_LOWAT, QUEUE_HIWAT); |
280 |
|
|
281 |
rawq = create_queue (256, QUEUE_LOWAT, QUEUE_HIWAT); |
rawq = create_queue (256, QUEUE_LOWAT, QUEUE_HIWAT); |
282 |
|
|
283 |
outputq = create_queue (256, QUEUE_LOWAT, QUEUE_HIWAT); |
outputq = create_queue (256, QUEUE_LOWAT, QUEUE_HIWAT); |
284 |
|
|
285 |
err = (*bottom->init) (); |
err = (*bottom->init) (); |
286 |
if (err) |
if (err) |
287 |
error (1, err, "Initializing bottom handler"); |
error (1, err, "Initializing bottom handler"); |
295 |
ports_manage_port_operations_multithread (term_bucket, demuxer, 0, 0, 0); |
ports_manage_port_operations_multithread (term_bucket, demuxer, 0, 0, 0); |
296 |
|
|
297 |
return 0; |
return 0; |
298 |
} |
} |