291 |
mach_port_t bootstrap, right; |
mach_port_t bootstrap, right; |
292 |
struct stat st; |
struct stat st; |
293 |
error_t err; |
error_t err; |
294 |
|
int openmode; |
295 |
|
|
296 |
term_bucket = ports_create_bucket (); |
term_bucket = ports_create_bucket (); |
297 |
|
|
316 |
peerclass = 0; |
peerclass = 0; |
317 |
peercntlclass = 0; |
peercntlclass = 0; |
318 |
peercntl = 0; |
peercntl = 0; |
319 |
|
openmode = 0; |
320 |
break; |
break; |
321 |
|
|
322 |
case T_HURDIO: |
case T_HURDIO: |
327 |
peerclass = 0; |
peerclass = 0; |
328 |
peercntlclass = 0; |
peercntlclass = 0; |
329 |
peercntl = 0; |
peercntl = 0; |
330 |
|
|
331 |
|
/* We don't want to have a writable peropen on the underlying node |
332 |
|
when we'll never use it. Ideally, we shouldn't open one until we |
333 |
|
do need it, in case it has an affect on the underlying node (like |
334 |
|
keeping DTR high and such). */ |
335 |
|
openmode = O_RDWR; |
336 |
break; |
break; |
337 |
|
|
338 |
case T_PTYMASTER: |
case T_PTYMASTER: |
343 |
peerclass = tty_class; |
peerclass = tty_class; |
344 |
peercntlclass = tty_cntl_class; |
peercntlclass = tty_cntl_class; |
345 |
peercntl = &termctl; |
peercntl = &termctl; |
346 |
|
openmode = 0; |
347 |
break; |
break; |
348 |
|
|
349 |
case T_PTYSLAVE: |
case T_PTYSLAVE: |
354 |
peerclass = pty_class; |
peerclass = pty_class; |
355 |
peercntlclass = pty_cntl_class; |
peercntlclass = pty_cntl_class; |
356 |
peercntl = &ptyctl; |
peercntl = &ptyctl; |
357 |
|
openmode = 0; |
358 |
break; |
break; |
359 |
|
|
360 |
default: |
default: |
370 |
error (1, 0, "Must be started as a translator"); |
error (1, 0, "Must be started as a translator"); |
371 |
|
|
372 |
/* Set our node. */ |
/* Set our node. */ |
373 |
err = trivfs_startup (bootstrap, O_RDWR, |
err = trivfs_startup (bootstrap, openmode, |
374 |
ourcntlclass, term_bucket, ourclass, term_bucket, |
ourcntlclass, term_bucket, ourclass, term_bucket, |
375 |
ourcntl); |
ourcntl); |
376 |
if (err) |
if (err) |