public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* cluster: STABLE3 - libgfs2: Forgot to remove headers from apps
@ 2009-02-19 10:09 Fabio M. Di Nitto
0 siblings, 0 replies; only message in thread
From: Fabio M. Di Nitto @ 2009-02-19 10:09 UTC (permalink / raw)
To: cluster-cvs-relay
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=a5f2bc8d9ac7f1b0cf78fd7827891d22407961f2
Commit: a5f2bc8d9ac7f1b0cf78fd7827891d22407961f2
Parent: 478ae253af3f4690c310315bb8caa1bf8b61b122
Author: Steven Whitehouse <swhiteho@redhat.com>
AuthorDate: Mon Jan 26 13:44:10 2009 +0000
Committer: Fabio M. Di Nitto <fdinitto@redhat.com>
CommitterDate: Thu Feb 19 10:59:55 2009 +0100
libgfs2: Forgot to remove headers from apps
The applications were including some of the headers directly,
and since they didn't (for some reason) rebuild when I removed
the headers, I missed that fact.
In fact one of the utils had included the content of ondisk.h
four times over into a single c file. I think we can just rely
of libgfs2.h for that now.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
---
gfs/gfs_fsck/ondisk.h | 43 +++++++++++++++++++++++++++++++++++++++
gfs2/convert/gfs2_convert.c | 2 -
gfs2/edit/gfs2hex.c | 2 -
gfs2/edit/hexedit.c | 2 -
gfs2/edit/hexedit.h | 1 -
gfs2/edit/savemeta.c | 1 -
gfs2/fsck/eattr.c | 1 -
gfs2/fsck/fs_recovery.c | 1 -
gfs2/fsck/initialize.c | 2 -
gfs2/fsck/metawalk.c | 1 -
gfs2/fsck/pass1.c | 1 -
gfs2/fsck/pass1b.c | 1 -
gfs2/fsck/pass1c.c | 1 -
gfs2/fsck/util.c | 1 -
gfs2/mkfs/gfs2_mkfs.h | 2 -
gfs2/mount/ondisk1.c | 2 -
gfs2/mount/util.h | 1 -
gfs2/quota/gfs2_quota.h | 1 -
gfs2/tool/ondisk.c | 2 -
group/gfs_controld/gfs_daemon.h | 1 -
20 files changed, 43 insertions(+), 26 deletions(-)
diff --git a/gfs/gfs_fsck/ondisk.h b/gfs/gfs_fsck/ondisk.h
index 01875c0..956964a 100644
--- a/gfs/gfs_fsck/ondisk.h
+++ b/gfs/gfs_fsck/ondisk.h
@@ -80,6 +80,49 @@
#ifndef __GFS_ONDISK_DOT_H__
#define __GFS_ONDISK_DOT_H__
+#include <endian.h>
+#include <byteorder.h>
+
+#if __BYTE_ORDER == __BIG_ENDIAN
+
+#define be16_to_cpu(x) (x)
+#define be32_to_cpu(x) (x)
+#define be64_to_cpu(x) (x)
+
+#define cpu_to_be16(x) (x)
+#define cpu_to_be32(x) (x)
+#define cpu_to_be64(x) (x)
+
+#define le16_to_cpu(x) (bswap_16((x)))
+#define le32_to_cpu(x) (bswap_32((x)))
+#define le64_to_cpu(x) (bswap_64((x)))
+
+#define cpu_to_le16(x) (bswap_16((x)))
+#define cpu_to_le32(x) (bswap_32((x)))
+#define cpu_to_le64(x) (bswap_64((x)))
+
+#endif /* __BYTE_ORDER == __BIG_ENDIAN */
+
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+
+#define be16_to_cpu(x) (bswap_16((x)))
+#define be32_to_cpu(x) (bswap_32((x)))
+#define be64_to_cpu(x) (bswap_64((x)))
+
+#define cpu_to_be16(x) (bswap_16((x)))
+#define cpu_to_be32(x) (bswap_32((x)))
+#define cpu_to_be64(x) (bswap_64((x)))
+
+#define le16_to_cpu(x) (x)
+#define le32_to_cpu(x) (x)
+#define le64_to_cpu(x) (x)
+
+#define cpu_to_le16(x) (x)
+#define cpu_to_le32(x) (x)
+#define cpu_to_le64(x) (x)
+
+#endif /* __BYTE_ORDER == __LITTLE_ENDIAN */
+
#define GFS_MAGIC (0x01161970) /* for all on-disk headers */
#define GFS_BASIC_BLOCK (512) /* "basic block" = "sector" = 512B */
#define GFS_BASIC_BLOCK_SHIFT (9)
diff --git a/gfs2/convert/gfs2_convert.c b/gfs2/convert/gfs2_convert.c
index e346635..634764a 100644
--- a/gfs2/convert/gfs2_convert.c
+++ b/gfs2/convert/gfs2_convert.c
@@ -20,12 +20,10 @@
#include <time.h>
#include <sys/time.h>
-#include "linux_endian.h"
#include <linux/types.h>
#include <linux/gfs2_ondisk.h>
#include "osi_list.h"
#include "copyright.cf"
-#include "ondisk.h"
#include "libgfs2.h"
/* The following declares are needed because gfs2 can't have */
diff --git a/gfs2/edit/gfs2hex.c b/gfs2/edit/gfs2hex.c
index ff69a02..d6f22d0 100644
--- a/gfs2/edit/gfs2hex.c
+++ b/gfs2/edit/gfs2hex.c
@@ -11,7 +11,6 @@
#include <curses.h>
#include "hexedit.h"
-#include "linux_endian.h"
#define WANT_GFS_CONVERSION_FUNCTIONS
#include <linux/gfs2_ondisk.h>
@@ -19,7 +18,6 @@
#include "gfs2hex.h"
/* from libgfs2: */
#include "libgfs2.h"
-#include "ondisk.h"
#define pv(struct, member, fmt, fmt2) do { \
print_it(" "#member, fmt, fmt2, struct->member); \
diff --git a/gfs2/edit/hexedit.c b/gfs2/edit/hexedit.c
index 4cf6795..9b1fcc4 100644
--- a/gfs2/edit/hexedit.c
+++ b/gfs2/edit/hexedit.c
@@ -17,13 +17,11 @@
#include <sys/mount.h>
#include <dirent.h>
-#include "linux_endian.h"
#include <linux/gfs2_ondisk.h>
#include "copyright.cf"
#define EXTERN
#include "hexedit.h"
-#include "linux_endian.h"
#include "libgfs2.h"
#include "gfs2hex.h"
diff --git a/gfs2/edit/hexedit.h b/gfs2/edit/hexedit.h
index 768a6d6..7d6a8b8 100644
--- a/gfs2/edit/hexedit.h
+++ b/gfs2/edit/hexedit.h
@@ -1,7 +1,6 @@
#ifndef __HEXVIEW_DOT_H__
#define __HEXVIEW_DOT_H__
-#include "linux_endian.h"
#include <sys/types.h>
#include <inttypes.h>
#include <limits.h>
diff --git a/gfs2/edit/savemeta.c b/gfs2/edit/savemeta.c
index 8b7637b..3587c4b 100644
--- a/gfs2/edit/savemeta.c
+++ b/gfs2/edit/savemeta.c
@@ -14,7 +14,6 @@
#include <term.h>
#include <sys/ioctl.h>
#include <limits.h>
-#include <linux_endian.h>
#include <sys/time.h>
#include <linux/gfs2_ondisk.h>
diff --git a/gfs2/fsck/eattr.c b/gfs2/fsck/eattr.c
index e32a366..0fe2421 100644
--- a/gfs2/fsck/eattr.c
+++ b/gfs2/fsck/eattr.c
@@ -1,6 +1,5 @@
#include <stdint.h>
#include <string.h>
-#include <linux_endian.h>
#include "libgfs2.h"
#include "fsck.h"
diff --git a/gfs2/fsck/fs_recovery.c b/gfs2/fsck/fs_recovery.c
index 06e71bf..fb830fe 100644
--- a/gfs2/fsck/fs_recovery.c
+++ b/gfs2/fsck/fs_recovery.c
@@ -1,6 +1,5 @@
#include <errno.h>
#include <inttypes.h>
-#include <linux_endian.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
diff --git a/gfs2/fsck/initialize.c b/gfs2/fsck/initialize.c
index 9378419..e3d3f6c 100644
--- a/gfs2/fsck/initialize.c
+++ b/gfs2/fsck/initialize.c
@@ -1,4 +1,3 @@
-#include <linux_endian.h>
#include <stdio.h>
#include <stdint.h>
#include <inttypes.h>
@@ -13,7 +12,6 @@
#include "fsck.h"
#include "util.h"
#include "fs_recovery.h"
-#include "linux_endian.h"
#define CLEAR_POINTER(x) \
if(x) { \
diff --git a/gfs2/fsck/metawalk.c b/gfs2/fsck/metawalk.c
index 8006291..278c8dd 100644
--- a/gfs2/fsck/metawalk.c
+++ b/gfs2/fsck/metawalk.c
@@ -1,5 +1,4 @@
#include <inttypes.h>
-#include <linux_endian.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/gfs2/fsck/pass1.c b/gfs2/fsck/pass1.c
index a33ad16..9d6d90d 100644
--- a/gfs2/fsck/pass1.c
+++ b/gfs2/fsck/pass1.c
@@ -21,7 +21,6 @@
#include "fsck.h"
#include "util.h"
#include "link.h"
-#include "linux_endian.h"
#include "metawalk.h"
struct block_count {
diff --git a/gfs2/fsck/pass1b.c b/gfs2/fsck/pass1b.c
index 88306ad..1b0dde0 100644
--- a/gfs2/fsck/pass1b.c
+++ b/gfs2/fsck/pass1b.c
@@ -1,5 +1,4 @@
#include <inttypes.h>
-#include <linux_endian.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
diff --git a/gfs2/fsck/pass1c.c b/gfs2/fsck/pass1c.c
index fa0e0db..aaeac15 100644
--- a/gfs2/fsck/pass1c.c
+++ b/gfs2/fsck/pass1c.c
@@ -1,5 +1,4 @@
#include <inttypes.h>
-#include <linux_endian.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
diff --git a/gfs2/fsck/util.c b/gfs2/fsck/util.c
index 54bc54d..46b1de3 100644
--- a/gfs2/fsck/util.c
+++ b/gfs2/fsck/util.c
@@ -1,5 +1,4 @@
#include <inttypes.h>
-#include <linux_endian.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
diff --git a/gfs2/mkfs/gfs2_mkfs.h b/gfs2/mkfs/gfs2_mkfs.h
index 0242c5f..493fa54 100644
--- a/gfs2/mkfs/gfs2_mkfs.h
+++ b/gfs2/mkfs/gfs2_mkfs.h
@@ -1,11 +1,9 @@
#ifndef __GFS2_MKFS_DOT_H__
#define __GFS2_MKFS_DOT_H__
-#include "linux_endian.h"
#include <linux/gfs2_ondisk.h>
#include "osi_list.h"
#include "copyright.cf"
-#include "ondisk.h"
/* main_grow */
void main_grow(int argc, char *argv[]);
diff --git a/gfs2/mount/ondisk1.c b/gfs2/mount/ondisk1.c
index 0a64021..846a702 100644
--- a/gfs2/mount/ondisk1.c
+++ b/gfs2/mount/ondisk1.c
@@ -4,8 +4,6 @@
#include <stdint.h>
#include <inttypes.h>
-#include "linux_endian.h"
-
#define printk printf
#define pv(struct, member, fmt) printf(" "#member" = "fmt"\n", struct->member);
diff --git a/gfs2/mount/util.h b/gfs2/mount/util.h
index 14c5182..2d40d82 100644
--- a/gfs2/mount/util.h
+++ b/gfs2/mount/util.h
@@ -20,7 +20,6 @@
#include <linux/types.h>
#include <linux/gfs2_ondisk.h>
#include "gfs_ondisk.h"
-#include "linux_endian.h"
#define die(fmt, args...) \
do { \
diff --git a/gfs2/quota/gfs2_quota.h b/gfs2/quota/gfs2_quota.h
index 7e31e4f..bcd945d 100644
--- a/gfs2/quota/gfs2_quota.h
+++ b/gfs2/quota/gfs2_quota.h
@@ -2,7 +2,6 @@
#define __GFS2_QUOTA_DOT_H__
#include "libgfs2.h"
-#include "linux_endian.h"
#include <linux/gfs2_ondisk.h>
#define type_zalloc(ptr, type, count) \
diff --git a/gfs2/tool/ondisk.c b/gfs2/tool/ondisk.c
index 6a31832..d10cfd8 100644
--- a/gfs2/tool/ondisk.c
+++ b/gfs2/tool/ondisk.c
@@ -5,8 +5,6 @@
#include <inttypes.h>
#include <linux/types.h>
-#include "linux_endian.h"
-
#define printk printf
#define WANT_GFS2_CONVERSION_FUNCTIONS
diff --git a/group/gfs_controld/gfs_daemon.h b/group/gfs_controld/gfs_daemon.h
index 157865a..529a9fc 100644
--- a/group/gfs_controld/gfs_daemon.h
+++ b/group/gfs_controld/gfs_daemon.h
@@ -40,7 +40,6 @@
#include "libgfscontrol.h"
#include "gfs_controld.h"
#include "list.h"
-#include "linux_endian.h"
/* TODO: warn if
DLM_LOCKSPACE_LEN (from dlmconstants.h) !=
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-02-19 10:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-19 10:09 cluster: STABLE3 - libgfs2: Forgot to remove headers from apps Fabio M. Di Nitto
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).