[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.18 and 1.21

version 1.18, 1999/01/26 02:23:34 version 1.21, 1999/09/20 04:38:59
Line 44  __RCSID("$NetBSD$");
Line 44  __RCSID("$NetBSD$");
   
 #include "namespace.h"  #include "namespace.h"
 #include <sys/types.h>  #include <sys/types.h>
   
   #include <assert.h>
 #include <err.h>  #include <err.h>
 #include <errno.h>  #include <errno.h>
 #include <fstab.h>  #include <fstab.h>
Line 76  nextfld(str, sep)
Line 78  nextfld(str, sep)
         const char *sep;          const char *sep;
 {  {
         char *ret;          char *ret;
   
           _DIAGASSERT(str != NULL);
           _DIAGASSERT(sep != NULL);
   
         while ((ret = strsep(str, sep)) != NULL && *ret == '\0')          while ((ret = strsep(str, sep)) != NULL && *ret == '\0')
                 continue;                  continue;
         return ret;          return ret;
Line 92  fstabscan()
Line 98  fstabscan()
         static const char sep[] = ":\n";          static const char sep[] = ":\n";
         static const char ws[] = " \t\n";          static const char ws[] = " \t\n";
         static char *fstab_type[] = {          static char *fstab_type[] = {
             FSTAB_RW, FSTAB_RQ, FSTAB_RO, FSTAB_SW, FSTAB_XX, NULL              FSTAB_RW, FSTAB_RQ, FSTAB_RO, FSTAB_SW, FSTAB_DP, FSTAB_XX, NULL
         };          };
   
         for (;;) {          for (;;) {
Line 177  struct fstab *
Line 183  struct fstab *
 getfsspec(name)  getfsspec(name)
         const char *name;          const char *name;
 {  {
   
           _DIAGASSERT(name != NULL);
   
         if (setfsent())          if (setfsent())
                 while (fstabscan())                  while (fstabscan())
                         if (!strcmp(_fs_fstab.fs_spec, name))                          if (!strcmp(_fs_fstab.fs_spec, name))
Line 188  struct fstab *
Line 197  struct fstab *
 getfsfile(name)  getfsfile(name)
         const char *name;          const char *name;
 {  {
   
           _DIAGASSERT(name != NULL);
   
         if (setfsent())          if (setfsent())
                 while (fstabscan())                  while (fstabscan())
                         if (!strcmp(_fs_fstab.fs_file, name))                          if (!strcmp(_fs_fstab.fs_file, name))

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.21

CVSweb <webmaster@jp.NetBSD.org>