Directory traversal (crossin mount points)

Weil timothy trw at aplcen.apl.jhu.edu
Sun Jul 1 00:25:43 AEST 1990


I'm writing a simple program to emulate the 'pwd' command
that traverses from the current directory to the ROOT_INODE
via a simple statement like - 
 
      while (this_dir_inode != ROOT_INO)
          chdir ..
          match this_dir_inode in parent_directory
          ....
      et cetra
 
Question: - since there are repitions of ROOT_INODE (#2)
across file system mount points, how can I distinguish the
ROOT_INODE for '/'   from '/usr'   or '/usr/users' ?
 
Hope this isn't too confusing.

       



More information about the Comp.unix.questions mailing list