/[hurd]/hurd/libnetfs/dir-lookup.c
ViewVC logotype

Diff of /hurd/libnetfs/dir-lookup.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.22 by marcus, Sun Sep 9 17:32:03 2001 UTC revision 1.23 by roland, Mon May 13 22:23:37 2002 UTC
# Line 1  Line 1 
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.
# Line 184  netfs_S_dir_lookup (struct protid *dirus Line 184  netfs_S_dir_lookup (struct protid *dirus
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;
# Line 205  netfs_S_dir_lookup (struct protid *dirus Line 205  netfs_S_dir_lookup (struct protid *dirus
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)
# Line 258  netfs_S_dir_lookup (struct protid *dirus Line 258  netfs_S_dir_lookup (struct protid *dirus
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,
# Line 286  netfs_S_dir_lookup (struct protid *dirus Line 286  netfs_S_dir_lookup (struct protid *dirus
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))))

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26