Whamcloud - gitweb
Branch b1_6
authorbwzhou <bwzhou>
Fri, 16 Nov 2007 03:24:21 +0000 (03:24 +0000)
committerbwzhou <bwzhou>
Fri, 16 Nov 2007 03:24:21 +0000 (03:24 +0000)
b=13317

add #ifdef for wiretest and wirecheck to resolve building issues;
minor fix for definitions of several macros in liblustre.h.

lustre/include/liblustre.h
lustre/utils/wirecheck.c
lustre/utils/wiretest.c

index 82436dd..d483374 100644 (file)
@@ -904,9 +904,15 @@ void posix_acl_release(struct posix_acl *acl)
 }
 
 #ifdef LIBLUSTRE_POSIX_ACL
- #define posix_acl_xattr_entry xattr_acl_entry
- #define posix_acl_xattr_header xattr_acl_header
- #define posix_acl_xattr_size(entry) xattr_acl_size(entry)
+ #ifndef posix_acl_xattr_entry 
+  #define posix_acl_xattr_entry xattr_acl_entry
+ #endif
+ #ifndef posix_acl_xattr_header 
+  #define posix_acl_xattr_header xattr_acl_header
+ #endif
+ #ifndef posix_acl_xattr_size
+  #define posix_acl_xattr_size(entry) xattr_acl_size(entry)
+ #endif
  #ifndef CONFIG_FS_POSIX_ACL
   #define CONFIG_FS_POSIX_ACL 1
  #endif
index e3e677f..c9e5593 100644 (file)
@@ -1025,6 +1025,7 @@ check_lustre_disk_data(void)
         CHECK_MEMBER(lustre_disk_data, ldd_params);
 }
 
+#ifdef LIBLUSTRE_POSIX_ACL
 static void
 check_posix_acl_xattr_entry(void)
 {
@@ -1043,6 +1044,7 @@ check_posix_acl_xattr_header(void)
         CHECK_MEMBER_TYPEDEF(posix_acl_xattr_header, a_version);
         CHECK_MEMBER_TYPEDEF(posix_acl_xattr_header, a_entries);
 }
+#endif
 
 static void
 system_string (char *cmdline, char *str, int len)
@@ -1293,8 +1295,10 @@ main(int argc, char **argv)
         check_qunit_data_old();
         check_mgs_target_info();
         check_lustre_disk_data();
+#ifdef LIBLUSTRE_POSIX_ACL
         check_posix_acl_xattr_entry();
         check_posix_acl_xattr_header();
+#endif
 
 
         printf("}\n\n");
index c0824d1..b2b832f 100644 (file)
@@ -2141,32 +2141,34 @@ void lustre_assert_wire_constants(void)
         LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_params) == 4096, " found %lld\n",
                  (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_params));
 
+#ifdef LIBLUSTRE_POSIX_ACL
         /* Checks for type posix_acl_xattr_entry */
-        LASSERTF((int)sizeof(xattr_acl_entry) == 8, " found %lld\n",
-                 (long long)(int)sizeof(xattr_acl_entry));
-        LASSERTF((int)offsetof(xattr_acl_entry, e_tag) == 0, " found %lld\n",
-                 (long long)(int)offsetof(xattr_acl_entry, e_tag));
-        LASSERTF((int)sizeof(((xattr_acl_entry *)0)->e_tag) == 2, " found %lld\n",
-                 (long long)(int)sizeof(((xattr_acl_entry *)0)->e_tag));
-        LASSERTF((int)offsetof(xattr_acl_entry, e_perm) == 2, " found %lld\n",
-                 (long long)(int)offsetof(xattr_acl_entry, e_perm));
-        LASSERTF((int)sizeof(((xattr_acl_entry *)0)->e_perm) == 2, " found %lld\n",
-                 (long long)(int)sizeof(((xattr_acl_entry *)0)->e_perm));
-        LASSERTF((int)offsetof(xattr_acl_entry, e_id) == 4, " found %lld\n",
-                 (long long)(int)offsetof(xattr_acl_entry, e_id));
-        LASSERTF((int)sizeof(((xattr_acl_entry *)0)->e_id) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((xattr_acl_entry *)0)->e_id));
+        LASSERTF((int)sizeof(posix_acl_xattr_entry) == 8, " found %lld\n",
+                 (long long)(int)sizeof(posix_acl_xattr_entry));
+        LASSERTF((int)offsetof(posix_acl_xattr_entry, e_tag) == 0, " found %lld\n",
+                 (long long)(int)offsetof(posix_acl_xattr_entry, e_tag));
+        LASSERTF((int)sizeof(((posix_acl_xattr_entry *)0)->e_tag) == 2, " found %lld\n",
+                 (long long)(int)sizeof(((posix_acl_xattr_entry *)0)->e_tag));
+        LASSERTF((int)offsetof(posix_acl_xattr_entry, e_perm) == 2, " found %lld\n",
+                 (long long)(int)offsetof(posix_acl_xattr_entry, e_perm));
+        LASSERTF((int)sizeof(((posix_acl_xattr_entry *)0)->e_perm) == 2, " found %lld\n",
+                 (long long)(int)sizeof(((posix_acl_xattr_entry *)0)->e_perm));
+        LASSERTF((int)offsetof(posix_acl_xattr_entry, e_id) == 4, " found %lld\n",
+                 (long long)(int)offsetof(posix_acl_xattr_entry, e_id));
+        LASSERTF((int)sizeof(((posix_acl_xattr_entry *)0)->e_id) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((posix_acl_xattr_entry *)0)->e_id));
 
         /* Checks for type posix_acl_xattr_header */
-        LASSERTF((int)sizeof(xattr_acl_header) == 4, " found %lld\n",
-                 (long long)(int)sizeof(xattr_acl_header));
-        LASSERTF((int)offsetof(xattr_acl_header, a_version) == 0, " found %lld\n",
-                 (long long)(int)offsetof(xattr_acl_header, a_version));
-        LASSERTF((int)sizeof(((xattr_acl_header *)0)->a_version) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((xattr_acl_header *)0)->a_version));
-        LASSERTF((int)offsetof(xattr_acl_header, a_entries) == 4, " found %lld\n",
-                 (long long)(int)offsetof(xattr_acl_header, a_entries));
-        LASSERTF((int)sizeof(((xattr_acl_header *)0)->a_entries) == 0, " found %lld\n",
-                 (long long)(int)sizeof(((xattr_acl_header *)0)->a_entries));
+        LASSERTF((int)sizeof(posix_acl_xattr_header) == 4, " found %lld\n",
+                 (long long)(int)sizeof(posix_acl_xattr_header));
+        LASSERTF((int)offsetof(posix_acl_xattr_header, a_version) == 0, " found %lld\n",
+                 (long long)(int)offsetof(posix_acl_xattr_header, a_version));
+        LASSERTF((int)sizeof(((posix_acl_xattr_header *)0)->a_version) == 4, " found %lld\n",
+                 (long long)(int)sizeof(((posix_acl_xattr_header *)0)->a_version));
+        LASSERTF((int)offsetof(posix_acl_xattr_header, a_entries) == 4, " found %lld\n",
+                 (long long)(int)offsetof(posix_acl_xattr_header, a_entries));
+        LASSERTF((int)sizeof(((posix_acl_xattr_header *)0)->a_entries) == 0, " found %lld\n",
+                 (long long)(int)sizeof(((posix_acl_xattr_header *)0)->a_entries));
+#endif
 
 }