1 |
/* |
/* |
2 |
Copyright (C) 1995,96,97,98,99,2000,01 Free Software Foundation, Inc. |
Copyright (C) 1995,96,97,98,99,2000,01,02 Free Software Foundation, Inc. |
3 |
Written by Michael I. Bushnell, p/BSG. |
Written by Michael I. Bushnell, p/BSG. |
4 |
|
|
5 |
This file is part of the GNU Hurd. |
This file is part of the GNU Hurd. |
184 |
goto out; |
goto out; |
185 |
|
|
186 |
if ((((flags & O_NOTRANS) == 0) || !lastcomp) |
if ((((flags & O_NOTRANS) == 0) || !lastcomp) |
187 |
&& ((np->nn_stat.st_mode & S_IPTRANS) |
&& ((np->nn_translated & S_IPTRANS) |
188 |
|| S_ISFIFO (np->nn_stat.st_mode) |
|| S_ISFIFO (np->nn_translated) |
189 |
|| S_ISCHR (np->nn_stat.st_mode) |
|| S_ISCHR (np->nn_translated) |
190 |
|| S_ISBLK (np->nn_stat.st_mode) |
|| S_ISBLK (np->nn_translated) |
191 |
|| fshelp_translated (&np->transbox))) |
|| fshelp_translated (&np->transbox))) |
192 |
{ |
{ |
193 |
mach_port_t dirport; |
mach_port_t dirport; |
205 |
if (err) |
if (err) |
206 |
return err; |
return err; |
207 |
|
|
208 |
switch (np->nn_stat.st_mode & S_IFMT) |
switch (np->nn_translated & S_IFMT) |
209 |
{ |
{ |
210 |
case S_IFCHR: |
case S_IFCHR: |
211 |
case S_IFBLK: |
case S_IFBLK: |
212 |
if (asprintf (argz, "%s%c%d%c%d", |
if (asprintf (argz, "%s%c%d%c%d", |
213 |
(S_ISCHR (np->nn_stat.st_mode) |
(S_ISCHR (np->nn_translated) |
214 |
? _HURD_CHRDEV : _HURD_BLKDEV), |
? _HURD_CHRDEV : _HURD_BLKDEV), |
215 |
0, major (np->nn_stat.st_rdev), |
0, major (np->nn_stat.st_rdev), |
216 |
0, minor (np->nn_stat.st_rdev)) < 0) |
0, minor (np->nn_stat.st_rdev)) < 0) |
258 |
dirport, |
dirport, |
259 |
diruser->user, |
diruser->user, |
260 |
lastcomp ? flags : 0, |
lastcomp ? flags : 0, |
261 |
((np->nn_stat.st_mode & S_IPTRANS) |
((np->nn_translated & S_IPTRANS) |
262 |
? _netfs_translator_callback1 |
? _netfs_translator_callback1 |
263 |
: short_circuited_callback1), |
: short_circuited_callback1), |
264 |
_netfs_translator_callback2, |
_netfs_translator_callback2, |
286 |
error = 0; |
error = 0; |
287 |
} |
} |
288 |
|
|
289 |
if (S_ISLNK (np->nn_stat.st_mode) |
if (S_ISLNK (np->nn_translated) |
290 |
&& (!lastcomp |
&& (!lastcomp |
291 |
|| mustbedir /* "foo/" must see that foo points to a dir */ |
|| mustbedir /* "foo/" must see that foo points to a dir */ |
292 |
|| !(flags & (O_NOLINK|O_NOTRANS)))) |
|| !(flags & (O_NOLINK|O_NOTRANS)))) |