BSD 4_4_Lite1 release
[unix-history] / usr / src / sbin / dump / optr.c
index afc9b8c..6db0908 100644 (file)
@@ -32,7 +32,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)optr.c     8.1 (Berkeley) 6/5/93";
+static char sccsid[] = "@(#)optr.c     8.2 (Berkeley) 1/6/94";
 #endif /* not lint */
 
 #include <sys/param.h>
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -455,12 +455,15 @@ fstabsearch(key)
 {
        register struct pfstab *pf;
        register struct fstab *fs;
 {
        register struct pfstab *pf;
        register struct fstab *fs;
+       char *rn;
 
        for (pf = table; pf != NULL; pf = pf->pf_next) {
                fs = pf->pf_fstab;
                if (strcmp(fs->fs_file, key) == 0 ||
 
        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)
+                   strcmp(fs->fs_spec, key) == 0)
+                       return (fs);
+               rn = rawname(fs->fs_spec);
+               if (rn != NULL && strcmp(rn, key) == 0)
                        return (fs);
                if (key[0] != '/') {
                        if (*fs->fs_spec == '/' &&
                        return (fs);
                if (key[0] != '/') {
                        if (*fs->fs_spec == '/' &&