Update from main archive 961219
[kopensolaris-gnu/glibc.git] / hurd / path-lookup.c
index 9e0fff4..04baab0 100644 (file)
@@ -80,7 +80,7 @@ file_name_path_scan (const char *file_name, const char *path,
 
 /* Lookup FILE_NAME and return the node opened with FLAGS & MODE in result
    (see hurd_file_name_lookup for details), but a simple filename (without
-   any directory prefixes) will be consectutively prefixed with the pathnames
+   any directory prefixes) will be consecutively prefixed with the pathnames
    in the `:' separated list PATH until one succeeds in a successful lookup.
    If none succeed, then the first error that wasn't ENOENT is returned, or
    ENOENT if no other errors were returned.  If PREFIXED_NAME is non-NULL,
@@ -89,20 +89,23 @@ file_name_path_scan (const char *file_name, const char *path,
    malloced storage containing the prefixed name.  */
 error_t
 hurd_file_name_path_lookup (error_t (*use_init_port)
-                           (int which,
-                            error_t (*operate) (mach_port_t)),
+                             (int which, error_t (*operate) (mach_port_t)),
                            file_t (*get_dtable_port) (int fd),
+                           error_t (*lookup)
+                             (file_t dir, char *name, int flags, mode_t mode,
+                              retry_type *do_retry, string_t retry_name,
+                              mach_port_t *result),
                            const char *file_name, const char *path,
                            int flags, mode_t mode,
                            file_t *result, char **prefixed_name)
 {
-  error_t lookup (const char *name)
+  error_t scan_lookup (const char *name)
     {
       return
-       __hurd_file_name_lookup (use_init_port, get_dtable_port,
+       __hurd_file_name_lookup (use_init_port, get_dtable_port, lookup,
                                 name, flags, mode, result);
     }
-  return file_name_path_scan (file_name, path, lookup, prefixed_name);
+  return file_name_path_scan (file_name, path, scan_lookup, prefixed_name);
 }
 
 file_t
@@ -112,7 +115,7 @@ file_name_path_lookup (const char *file_name, const char *path,
   error_t err;
   file_t result;
 
-  err = hurd_file_name_path_lookup (&_hurd_ports_use, &__getdport,
+  err = hurd_file_name_path_lookup (&_hurd_ports_use, &__getdport, 0,
                                    file_name, path, flags, mode,
                                    &result, prefixed_name);