- register struct fstab *dt;
- int i;
- int keylength;
- char *rawname();
-
- keylength = min(strlen(key), sizeof (dt->fs_file));
- for (i = 0, dt = fstab; i < nfstab; i++, dt++){
- if (strncmp(dt->fs_file, key, keylength) == 0)
- return(dt);
- if (strncmp(dt->fs_spec, key, keylength) == 0)
- return(dt);
- if (strncmp(rawname(dt->fs_spec), key, keylength) == 0)
- return(dt);
-
- if (key[0] != '/'){
- if ( (dt->fs_spec[0] == '/')
- && (strncmp(dt->fs_spec+1, key, keylength) == 0))
- return(dt);
- if ( (dt->fs_file[0] == '/')
- && (strncmp(dt->fs_file+1, key, keylength) == 0))
- return(dt);
+ register struct pfstab *pf;
+ register struct fstab *fs;
+ char *rawname();
+
+ for (pf = table; pf != NULL; pf = pf->pf_next) {
+ fs = pf->pf_fstab;
+ if (strcmp(fs->fs_file, key) == 0 ||
+ strcmp(fs->fs_spec, key) == 0 ||
+ strcmp(rawname(fs->fs_spec), key) == 0)
+ return (fs);
+ if (key[0] != '/') {
+ if (*fs->fs_spec == '/' &&
+ strcmp(fs->fs_spec + 1, key) == 0)
+ return (fs);
+ if (*fs->fs_file == '/' &&
+ strcmp(fs->fs_file + 1, key) == 0)
+ return (fs);