Whamcloud - gitweb
LU-6245 tests: remove libcfs.h from test applications
[fs/lustre-release.git] / lustre / tests / test_brw.c
index 3d7a344..d0773e9 100644 (file)
@@ -26,6 +26,8 @@
 /*
  * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
+ *
+ * Copyright (c) 2014, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
 #include <sys/mman.h>
 #include <sys/types.h>
 #include <sys/stat.h>
+#include <linux/types.h>
 
-#include <liblustre.h>
+#include <libcfs/types.h>
+#include <libcfs/byteorder.h>
 
 #define READ  1
 #define WRITE 2
@@ -75,24 +79,24 @@ int block_debug_check(char *who, void *addr, int size, __u64 off, __u64 id)
         ne_off = le64_to_cpu(off);
         id = le64_to_cpu(id);
         if (memcmp(addr, (char *)&ne_off, LPDS)) {
-                CERROR("%s: for offset "LPU64" off: "LPX64" != "LPX64"\n",
+               fprintf(stderr, "%s: for offset "LPU64" off: "LPX64" != "LPX64"\n",
                        who, off, *(__u64 *)addr, ne_off);
                 err = -EINVAL;
         }
         if (memcmp(addr + LPDS, (char *)&id, LPDS)) {
-                CERROR("%s: for offset "LPU64" id: "LPX64" != "LPX64"\n",
+               fprintf(stderr, "%s: for offset "LPU64" id: "LPX64" != "LPX64"\n",
                        who, off, *(__u64 *)(addr + LPDS), id);
                 err = -EINVAL;
         }
 
         addr += size - LPDS - LPDS;
         if (memcmp(addr, (char *)&ne_off, LPDS)) {
-                CERROR("%s: for offset "LPU64" end off: "LPX64" != "LPX64"\n",
+               fprintf(stderr, "%s: for offset "LPU64" end off: "LPX64" != "LPX64"\n",
                        who, off, *(__u64 *)addr, ne_off);
                 err = -EINVAL;
         }
         if (memcmp(addr + LPDS, (char *)&id, LPDS)) {
-                CERROR("%s: for offset "LPU64" end id: "LPX64" != "LPX64"\n",
+               fprintf(stderr, "%s: for offset "LPU64" end id: "LPX64" != "LPX64"\n",
                        who, off, *(__u64 *)(addr + LPDS), id);
                 err = -EINVAL;
         }