[BACK]Return to fstab.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libc / gen

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/lib/libc/gen/fstab.c between version 1.5 and 1.9

version 1.5, 1994/08/13 09:41:50 version 1.9, 1997/01/23 14:01:52
Line 1 
Line 1 
   /*      $NetBSD$        */
   
 /*  /*
  * Copyright (c) 1980, 1988 Regents of the University of California.   * Copyright (c) 1980, 1988, 1993
  * All rights reserved.   *      The Regents of the University of California.  All rights reserved.
  *   *
  * Redistribution and use in source and binary forms, with or without   * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions   * modification, are permitted provided that the following conditions
Line 32 
Line 34 
  */   */
   
 #if defined(LIBC_SCCS) && !defined(lint)  #if defined(LIBC_SCCS) && !defined(lint)
 /*static char *sccsid = "from: @(#)fstab.c      5.15 (Berkeley) 2/23/91";*/  #if 0
 static char *rcsid = "$Id$";  static char sccsid[] = "@(#)fstab.c     8.1 (Berkeley) 6/4/93";
   #else
   static char rcsid[] = "$NetBSD$";
   #endif
 #endif /* LIBC_SCCS and not lint */  #endif /* LIBC_SCCS and not lint */
   
 #include <sys/types.h>  #include <sys/types.h>
 #include <sys/errno.h>  
 #include <sys/uio.h>  #include <sys/uio.h>
   #include <errno.h>
 #include <fstab.h>  #include <fstab.h>
 #include <unistd.h>  
 #include <stdio.h>  #include <stdio.h>
 #include <stdlib.h>  #include <stdlib.h>
 #include <string.h>  #include <string.h>
   #include <unistd.h>
   
 static FILE *_fs_fp;  static FILE *_fs_fp;
 static struct fstab _fs_fstab;  static struct fstab _fs_fstab;
 static error();  
   
 static  static void error __P((int));
   static int fstabscan __P((void));
   
   static int
 fstabscan()  fstabscan()
 {  {
         register char *cp;          register char *cp;
Line 101  fstabscan()
Line 108  fstabscan()
                         if ((cp = strtok((char *)NULL, " \t\n")) != NULL)                          if ((cp = strtok((char *)NULL, " \t\n")) != NULL)
                                 _fs_fstab.fs_passno = atoi(cp);                                  _fs_fstab.fs_passno = atoi(cp);
                 }                  }
                 strcpy(subline, _fs_fstab.fs_mntops);                  (void)strncpy(subline, _fs_fstab.fs_mntops, sizeof(subline)-1);
                 for (typexx = 0, cp = strtok(subline, ","); cp;                  for (typexx = 0, cp = strtok(subline, ","); cp;
                      cp = strtok((char *)NULL, ",")) {                       cp = strtok((char *)NULL, ",")) {
                         if (strlen(cp) != 2)                          if (strlen(cp) != 2)
Line 169  getfsfile(name)
Line 176  getfsfile(name)
         return((struct fstab *)NULL);          return((struct fstab *)NULL);
 }  }
   
   int
 setfsent()  setfsent()
 {  {
         if (_fs_fp) {          if (_fs_fp) {
Line 190  endfsent()
Line 198  endfsent()
         }          }
 }  }
   
 static  static void
 error(err)  error(err)
         int err;          int err;
 {  {

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.9

CVSweb <webmaster@jp.NetBSD.org>