/[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.21 by roland, Sat Jun 16 20:23:29 2001 UTC revision 1.22 by marcus, Sun Sep 9 17:32:03 2001 UTC
# Line 209  netfs_S_dir_lookup (struct protid *dirus Line 209  netfs_S_dir_lookup (struct protid *dirus
209                  {                  {
210                  case S_IFCHR:                  case S_IFCHR:
211                  case S_IFBLK:                  case S_IFBLK:
212                    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_stat.st_mode)
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, minor (np->nn_stat.st_rdev)) < 0)
217                        return ENOMEM;
218                    *argz_len = strlen (*argz) + 1;                    *argz_len = strlen (*argz) + 1;
219                    *argz_len += strlen (*argz + *argz_len) + 1;                    *argz_len += strlen (*argz + *argz_len) + 1;
220                    *argz_len += strlen (*argz + *argz_len) + 1;                    *argz_len += strlen (*argz + *argz_len) + 1;
221                    break;                    break;
222                  case S_IFIFO:                  case S_IFIFO:
223                    asprintf (argz, "%s", _HURD_FIFO);                    if (asprintf (argz, "%s", _HURD_FIFO) < 0)
224                        return ENOMEM;
225                    *argz_len = strlen (*argz) + 1;                    *argz_len = strlen (*argz) + 1;
226                    break;                    break;
227                  default:                  default:
# Line 242  netfs_S_dir_lookup (struct protid *dirus Line 244  netfs_S_dir_lookup (struct protid *dirus
244                                           user);                                           user);
245                if (! newpi)                if (! newpi)
246                  {                  {
247                      error = errno;
248                    iohelp_free_iouser (user);                    iohelp_free_iouser (user);
                   error = ENOMEM;  
249                  }                  }
250              }              }
251    
# Line 381  netfs_S_dir_lookup (struct protid *dirus Line 383  netfs_S_dir_lookup (struct protid *dirus
383    
384    newpi = netfs_make_protid (netfs_make_peropen (np, flags, diruser->po),    newpi = netfs_make_protid (netfs_make_peropen (np, flags, diruser->po),
385                               user);                               user);
386      if (! newpi)
387        {
388          iohelp_free_iouser (user);
389          error = errno;
390          goto out;
391        }
392    
393    *retry_port = ports_get_right (newpi);    *retry_port = ports_get_right (newpi);
394    ports_port_deref (newpi);    ports_port_deref (newpi);
395    

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

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