]> andersk Git - moira.git/blobdiff - lib/nfsparttype.c
missing coma in last change, causes compile_et to coredump
[moira.git] / lib / nfsparttype.c
index bebec4ce125bf7b3d948edc3c91862dd37f1fa3f..c7e47cf5b37b9db992f1667d33427edd400915fa 100644 (file)
@@ -4,10 +4,8 @@
  *     $Header$
  *
  *     Copyright (C) 1987 by the Massachusetts Institute of Technology
- *
- *     $Log$
- *     Revision 1.1  1987-09-03 03:13:40  wesommer
- *     Initial revision
+ *     For copying and distribution information, please see the file
+ *     <mit-copyright.h>.
  *
  */
 
 static char *rcsid_nfsparttype_c = "$Header$";
 #endif lint
 
-#include <sms.h>
+#include <mit-copyright.h>
+#include <moira.h>
 #include <stdio.h>
-#include <strings.h>
+#include <string.h>
 #include <ctype.h>
 
 extern char *strsave();
@@ -33,12 +32,11 @@ struct pair {
  */
 
 static struct pair fs_names[] = {
-    { SMS_FS_STUDENT, "Student" },
-    { SMS_FS_FACULTY, "Faculty/Project" },
-    { SMS_FS_FACULTY, "Faculty" },
-    { SMS_FS_FACULTY, "Project" },
-    { SMS_FS_STAFF, "Staff" },
-    { SMS_FS_MISC, "Other" },
+    { MR_FS_STUDENT, "Student" },
+    { MR_FS_FACULTY, "Faculty" },
+    { MR_FS_STAFF, "Staff" },
+    { MR_FS_MISC, "Other" },
+    { MR_FS_GROUPQUOTA, "GroupQuota" },
     /* Insert new entries before the 0,0 pair */
     { 0, 0 },
 };
@@ -93,9 +91,9 @@ parse_filesys_type(fs_type_name)
     
     do {
        /* Copy next component of type to temp */
-       char *t = index (cp, ',');
+       char *t = strchr (cp, ',');
        if (t) {
-           bcopy(cp, temp, t-cp);
+           memcpy(temp, cp, t-cp);
            temp[t-cp]='\0';
            cp = t + 1; /* one after the comma */
        } else {
@@ -106,7 +104,7 @@ parse_filesys_type(fs_type_name)
        t = strtrim(temp);      /* nuke leading and trailing whitespace */
 
        for (pp = fs_names; pp->type; pp++) {
-           if (cistrcmp(pp->name, t) == 0) {
+           if (strcasecmp(pp->name, t) == 0) {
                flags |= pp->type;
                break;
            }
This page took 0.034545 seconds and 4 git commands to generate.