]> arthur.barton.de Git - netatalk.git/commitdiff
Add all EA opts to volinfo
authorfranklahm <franklahm>
Tue, 22 Dec 2009 10:46:28 +0000 (10:46 +0000)
committerfranklahm <franklahm>
Tue, 22 Dec 2009 10:46:28 +0000 (10:46 +0000)
libatalk/util/volinfo.c

index 42712fcf71df4d4a2f9d04c18078eafce2239625..ef438c5d278f5b103a968e8e41953c9cad4d5021 100644 (file)
@@ -492,14 +492,22 @@ int savevolinfo(const struct vol *vol, const char *Cnid_srv, const char *Cnid_po
     strlcat(item, "\n", sizeof(item));
     strlcat(buf, item, sizeof(buf));
 
-    /* ExtendedAttrbutes */
+    /* ExtendedAttributes */
     strcpy(item, "EXTATTRTYPE:");
-    if (vol->v_vfs_ea & AFPVOL_EA_AD)
-        strlcat(item, "AFPVOL_EA_AD\n", sizeof(item));
-    else if (vol->v_vfs_ea & AFPVOL_EA_SYS)
+    switch (vol->v_vfs_ea) {
+    case AFPVOL_EA_SYS:
         strlcat(item, "AFPVOL_EA_SYS\n", sizeof(item));
-    else
+        break;
+    case AFPVOL_EA_AD:
+        strlcat(item, "AFPVOL_EA_AD\n", sizeof(item));
+        break;
+    case AFPVOL_EA_NONE:
+        strlcat(item, "AFPVOL_EA_NONE\n", sizeof(item));
+        break;
+    default:
         strlcat(item, "AFPVOL_EA_UNKNOWN\n", sizeof(item));
+    }
+
     strlcat(buf, item, sizeof(buf));
 
     if (strlen(buf) >= sizeof(buf)-1)