141 |
termname = terminal + strlen (terminal) + 1; /* first arg is name */ |
termname = terminal + strlen (terminal) + 1; /* first arg is name */ |
142 |
|
|
143 |
/* The callback to start_translator opens TERM as a side effect. */ |
/* The callback to start_translator opens TERM as a side effect. */ |
144 |
errno = |
err = |
145 |
fshelp_start_translator (open_node, NULL, terminal, terminal, |
fshelp_start_translator (open_node, NULL, terminal, terminal, |
146 |
argz_len, 3000, &control); |
argz_len, 3000, &control); |
147 |
if (errno) |
if (err) |
148 |
{ |
{ |
149 |
error (0, errno, "%s", terminal); |
error (0, err, "%s", terminal); |
150 |
continue; |
continue; |
151 |
} |
} |
152 |
|
|
153 |
errno = file_set_translator (term, 0, FS_TRANS_SET, 0, 0, 0, |
err = file_set_translator (term, 0, FS_TRANS_SET, 0, 0, 0, |
154 |
control, MACH_MSG_TYPE_COPY_SEND); |
control, MACH_MSG_TYPE_COPY_SEND); |
155 |
mach_port_deallocate (mach_task_self (), control); |
mach_port_deallocate (mach_task_self (), control); |
156 |
if (errno) |
if (err) |
157 |
{ |
{ |
158 |
error (0, errno, "%s", termname); |
error (0, err, "%s", termname); |
159 |
continue; |
continue; |
160 |
} |
} |
161 |
mach_port_deallocate (mach_task_self (), term); |
mach_port_deallocate (mach_task_self (), term); |
167 |
error (0, errno, "%s", termname); |
error (0, errno, "%s", termname); |
168 |
continue; |
continue; |
169 |
} |
} |
170 |
errno = io_stat (term, &st); |
err = io_stat (term, &st); |
171 |
if (errno) |
if (err) |
172 |
{ |
{ |
173 |
error (0, errno, "%s", termname); |
error (0, err, "%s", termname); |
174 |
term = MACH_PORT_NULL; |
term = MACH_PORT_NULL; |
175 |
continue; |
continue; |
176 |
} |
} |