Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-4961 lustre: remove liblustre.h and obd.h from userspace
[fs/lustre-release.git]
/
lustre
/
utils
/
llog_reader.c
diff --git
a/lustre/utils/llog_reader.c
b/lustre/utils/llog_reader.c
index
3c994fc
..
2a1903b
100644
(file)
--- a/
lustre/utils/llog_reader.c
+++ b/
lustre/utils/llog_reader.c
@@
-39,11
+39,23
@@
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <endian.h>
#include <fcntl.h>
#include <time.h>
#include <fcntl.h>
#include <time.h>
-#include <lib
lustre
.h>
+#include <lib
cfs/libcfs
.h>
#include <lustre/lustre_idl.h>
#include <lustre/lustre_idl.h>
+#include <lustre_cfg.h>
+
+static inline int ext2_test_bit(int nr, const void *addr)
+{
+#if __BYTE_ORDER == __BIG_ENDIAN
+ const unsigned char *tmp = addr;
+ return (tmp[nr >> 3] >> (nr & 7)) & 1;
+#else
+ return test_bit(nr, addr);
+#endif
+}
int llog_pack_buffer(int fd, struct llog_log_hdr **llog_buf,
struct llog_rec_hdr ***recs, int *recs_number);
int llog_pack_buffer(int fd, struct llog_log_hdr **llog_buf,
struct llog_rec_hdr ***recs, int *recs_number);