BSD 4_3_Reno release
[unix-history] / usr / src / lib / libc / gen / fstab.c
index 45bf3b0..dd5ea63 100644 (file)
@@ -2,11 +2,23 @@
  * Copyright (c) 1980, 1988 Regents of the University of California.
  * All rights reserved.
  *
  * Copyright (c) 1980, 1988 Regents of the University of California.
  * All rights reserved.
  *
- * %sccs.include.redist.c%
+ * Redistribution and use in source and binary forms are permitted
+ * provided that: (1) source distributions retain this entire copyright
+ * notice and comment, and (2) distributions including binaries display
+ * the following acknowledgement:  ``This product includes software
+ * developed by the University of California, Berkeley and its contributors''
+ * in the documentation or other materials provided with the distribution
+ * and in all advertising materials mentioning features or use of this
+ * software. Neither the name of the University nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)fstab.c    5.12 (Berkeley) %G%";
+static char sccsid[] = "@(#)fstab.c    5.11 (Berkeley) 6/1/90";
 #endif /* LIBC_SCCS and not lint */
 
 #include <fstab.h>
 #endif /* LIBC_SCCS and not lint */
 
 #include <fstab.h>
@@ -29,29 +41,6 @@ fstabscan()
        for (;;) {
                if (!(cp = fgets(line, sizeof(line), _fs_fp)))
                        return(0);
        for (;;) {
                if (!(cp = fgets(line, sizeof(line), _fs_fp)))
                        return(0);
-/* OLD_STYLE_FSTAB */
-               if (!strpbrk(cp, " \t")) {
-                       _fs_fstab.fs_spec = strtok(cp, ":\n");
-                       _fs_fstab.fs_file = strtok((char *)NULL, ":\n");
-                       _fs_fstab.fs_type = strtok((char *)NULL, ":\n");
-                       if (_fs_fstab.fs_type) {
-                               if (!strcmp(_fs_fstab.fs_type, FSTAB_XX))
-                                       continue;
-                               _fs_fstab.fs_mntops = _fs_fstab.fs_type;
-                               _fs_fstab.fs_vfstype =
-                                   strcmp(_fs_fstab.fs_type, FSTAB_SW) ?
-                                   "ufs" : "swap";
-                               if (cp = strtok((char *)NULL, ":\n")) {
-                                       _fs_fstab.fs_freq = atoi(cp);
-                                       if (cp = strtok((char *)NULL, ":\n")) {
-                                               _fs_fstab.fs_passno = atoi(cp);
-                                               return(1);
-                                       }
-                               }
-                       }
-                       goto bad;
-               }
-/* OLD_STYLE_FSTAB */
                _fs_fstab.fs_spec = strtok(cp, " \t\n");
                if (!_fs_fstab.fs_spec || *_fs_fstab.fs_spec == '#')
                        continue;
                _fs_fstab.fs_spec = strtok(cp, " \t\n");
                if (!_fs_fstab.fs_spec || *_fs_fstab.fs_spec == '#')
                        continue;
@@ -98,8 +87,8 @@ fstabscan()
                        continue;
                if (cp != NULL)
                        return(1);
                        continue;
                if (cp != NULL)
                        return(1);
-
-bad:           /* no way to distinguish between EOF and syntax error */
+       bad:
+               /* no way to distinguish between EOF and syntax error */
                (void)write(STDERR_FILENO, "fstab: ", 7);
                (void)write(STDERR_FILENO, _PATH_FSTAB,
                    sizeof(_PATH_FSTAB) - 1);
                (void)write(STDERR_FILENO, "fstab: ", 7);
                (void)write(STDERR_FILENO, _PATH_FSTAB,
                    sizeof(_PATH_FSTAB) - 1);