BSD 4_3_Tahoe release
[unix-history] / usr / src / old / dump.4.1 / dumpoptr.c
index b23231c..aa102d1 100644 (file)
@@ -1,4 +1,13 @@
-static char *sccsid = "@(#)dumpoptr.c  1.5 (Berkeley) %G%";
+/*
+ * Copyright (c) 1980 Regents of the University of California.
+ * All rights reserved.  The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ */
+
+#ifndef lint
+static char sccsid[] = "@(#)dumpoptr.c 5.1 (Berkeley) 6/5/85";
+#endif not lint
+
 #include "dump.h"
 
 /*
 #include "dump.h"
 
 /*
@@ -346,26 +355,24 @@ fstabsearch(key)
 {
        register struct pfstab *pf;
        register struct fstab *fs;
 {
        register struct pfstab *pf;
        register struct fstab *fs;
-       register int i, keylength;
        char *rawname();
 
        if (table == NULL)
                return ((struct fstab *)0);
        char *rawname();
 
        if (table == NULL)
                return ((struct fstab *)0);
-       keylength = min(strlen(key), sizeof (table->pf_fstab->fs_file));
        for (pf = table; pf; pf = pf->pf_next) {
                fs = pf->pf_fstab;
        for (pf = table; pf; pf = pf->pf_next) {
                fs = pf->pf_fstab;
-               if (strncmp(fs->fs_file, key, keylength) == 0)
+               if (strcmp(fs->fs_file, key) == 0)
                        return (fs);
                        return (fs);
-               if (strncmp(fs->fs_spec, key, keylength) == 0)
+               if (strcmp(fs->fs_spec, key) == 0)
                        return (fs);
                        return (fs);
-               if (strncmp(rawname(fs->fs_spec), key, keylength) == 0)
+               if (strcmp(rawname(fs->fs_spec), key) == 0)
                        return (fs);
                if (key[0] != '/'){
                        if (*fs->fs_spec == '/' &&
                        return (fs);
                if (key[0] != '/'){
                        if (*fs->fs_spec == '/' &&
-                           strncmp(fs->fs_spec + 1, key, keylength) == 0)
+                           strcmp(fs->fs_spec + 1, key) == 0)
                                return (fs);
                        if (*fs->fs_file == '/' &&
                                return (fs);
                        if (*fs->fs_file == '/' &&
-                           strncmp(fs->fs_file + 1, key, keylength) == 0)
+                           strcmp(fs->fs_file + 1, key) == 0)
                                return (fs);
                }
        }
                                return (fs);
                }
        }