cluster: STABLE3 - libgfs2: Remove pv macros from library
Fabio M. Di Nitto
fabbione@fedoraproject.org
Thu Feb 19 10:09:00 GMT 2009
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=6e27a274a1c3b4f408735fd1e02a308c875b4140
Commit: 6e27a274a1c3b4f408735fd1e02a308c875b4140
Parent: e3a9ac674fa0ff025e833dcfbc8575cada369843
Author: Steven Whitehouse <swhiteho@redhat.com>
AuthorDate: Mon Jan 26 07:54:14 2009 +0000
Committer: Fabio M. Di Nitto <fdinitto@redhat.com>
CommitterDate: Thu Feb 19 10:59:53 2009 +0100
libgfs2: Remove pv macros from library
These macros have no business being in the library, so I've moved
them into the files where they are used (in fact very few).
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
---
gfs2/edit/gfs2hex.c | 7 +++++++
gfs2/edit/hexedit.c | 5 +++++
gfs2/libgfs2/libgfs2.h | 7 -------
gfs2/libgfs2/ondisk.c | 7 +++++++
4 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/gfs2/edit/gfs2hex.c b/gfs2/edit/gfs2hex.c
index a63c421..ff69a02 100644
--- a/gfs2/edit/gfs2hex.c
+++ b/gfs2/edit/gfs2hex.c
@@ -21,6 +21,13 @@
#include "libgfs2.h"
#include "ondisk.h"
+#define pv(struct, member, fmt, fmt2) do { \
+ print_it(" "#member, fmt, fmt2, struct->member); \
+ } while (FALSE);
+#define pv2(struct, member, fmt, fmt2) do { \
+ print_it(" ", fmt, fmt2, struct->member); \
+ } while (FALSE);
+
extern struct gfs2_sb sb;
extern char *buf;
diff --git a/gfs2/edit/hexedit.c b/gfs2/edit/hexedit.c
index 099d66e..4cf6795 100644
--- a/gfs2/edit/hexedit.c
+++ b/gfs2/edit/hexedit.c
@@ -27,6 +27,11 @@
#include "libgfs2.h"
#include "gfs2hex.h"
+#define pv(struct, member, fmt, fmt2) do { \
+ print_it(" "#member, fmt, fmt2, struct->member); \
+ } while (FALSE);
+
+
#define RGLIST_DUMMY_BLOCK -2
int display(int identify_only);
diff --git a/gfs2/libgfs2/libgfs2.h b/gfs2/libgfs2/libgfs2.h
index e258a76..a7bf46a 100644
--- a/gfs2/libgfs2/libgfs2.h
+++ b/gfs2/libgfs2/libgfs2.h
@@ -689,14 +689,7 @@ extern int write_sb(struct gfs2_sbd *sdp);
/* ondisk.c */
extern uint32_t gfs2_disk_hash(const char *data, int len);
-
extern void print_it(const char *label, const char *fmt, const char *fmt2, ...);
-#define pv(struct, member, fmt, fmt2) do { \
- print_it(" "#member, fmt, fmt2, struct->member); \
- } while (FALSE);
-#define pv2(struct, member, fmt, fmt2) do { \
- print_it(" ", fmt, fmt2, struct->member); \
- } while (FALSE);
__END_DECLS
diff --git a/gfs2/libgfs2/ondisk.c b/gfs2/libgfs2/ondisk.c
index d80c9bb..2ee3024 100644
--- a/gfs2/libgfs2/ondisk.c
+++ b/gfs2/libgfs2/ondisk.c
@@ -9,6 +9,13 @@
#include "gfs2_disk_hash.h"
+#define pv(struct, member, fmt, fmt2) do { \
+ print_it(" "#member, fmt, fmt2, struct->member); \
+ } while (FALSE);
+#define pv2(struct, member, fmt, fmt2) do { \
+ print_it(" ", fmt, fmt2, struct->member); \
+ } while (FALSE);
+
#define CPIN_08(s1, s2, member, count) {memcpy((s1->member), (s2->member), (count));}
#define CPOUT_08(s1, s2, member, count) {memcpy((s2->member), (s1->member), (count));}
More information about the Cluster-cvs
mailing list