#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <linux/types.h>
-#include <libcfs/libcfs.h>
+#include <libcfs/types.h>
+#include <libcfs/byteorder.h>
#define READ 1
#define WRITE 2
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;
}