public inbox for cluster-cvs@sourceware.org help / color / mirror / Atom feed
From: Bob Peterson <rpeterso@fedoraproject.org> To: cluster-cvs-relay@redhat.com Subject: cluster: RHEL5 - Add #ifdefs to allow gfs2-utils to compile on older kernels Date: Tue, 11 Aug 2009 21:18:00 -0000 [thread overview] Message-ID: <20090811211807.5D9FA1201D6@lists.fedorahosted.org> (raw) Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=14cf0e60735aaf5f55f53d9295e17c796ae58aab Commit: 14cf0e60735aaf5f55f53d9295e17c796ae58aab Parent: a433f20da90644561d0433ab200ee7c54e77e935 Author: Bob Peterson <rpeterso@redhat.com> AuthorDate: Tue Aug 11 16:19:22 2009 -0500 Committer: Bob Peterson <rpeterso@redhat.com> CommitterDate: Tue Aug 11 16:19:22 2009 -0500 Add #ifdefs to allow gfs2-utils to compile on older kernels bz 515370 This patch pulls in a bunch of #ifdef statements, as they appear upstream, to allow gfs2-utils to compile properly on older kernels. --- gfs2/edit/gfs2hex.c | 2 ++ gfs2/libgfs2/ondisk.c | 8 ++++++++ gfs2/libgfs2/structures.c | 3 ++- gfs2/tool/sb.c | 2 ++ 4 files changed, 14 insertions(+), 1 deletions(-) diff --git a/gfs2/edit/gfs2hex.c b/gfs2/edit/gfs2hex.c index 869ee00..977770d 100644 --- a/gfs2/edit/gfs2hex.c +++ b/gfs2/edit/gfs2hex.c @@ -469,7 +469,9 @@ void gfs2_sb_print2(struct gfs2_sb *sb) gfs2_inum_print2("quota ino ", &gfs1_quota_di); gfs2_inum_print2("license ", &gfs1_license_di); } +#ifdef GFS2_HAS_UUID print_it(" sb_uuid", "%s", NULL, str_uuid(sb->sb_uuid)); +#endif } /****************************************************************************** diff --git a/gfs2/libgfs2/ondisk.c b/gfs2/libgfs2/ondisk.c index 4d14448..60a0bd8 100644 --- a/gfs2/libgfs2/ondisk.c +++ b/gfs2/libgfs2/ondisk.c @@ -112,7 +112,9 @@ void gfs2_sb_in(struct gfs2_sb *sb, char *buf) CPIN_08(sb, str, sb_lockproto, GFS2_LOCKNAME_LEN); CPIN_08(sb, str, sb_locktable, GFS2_LOCKNAME_LEN); +#ifdef GFS2_HAS_UUID CPIN_08(sb, str, sb_uuid, sizeof(sb->sb_uuid)); +#endif } void gfs2_sb_out(struct gfs2_sb *sb, char *buf) @@ -132,7 +134,9 @@ void gfs2_sb_out(struct gfs2_sb *sb, char *buf) CPOUT_08(sb, str, sb_lockproto, GFS2_LOCKNAME_LEN); CPOUT_08(sb, str, sb_locktable, GFS2_LOCKNAME_LEN); +#ifdef GFS2_HAS_UUID CPOUT_08(sb, str, sb_uuid, sizeof(sb->sb_uuid)); +#endif } const char *str_uuid(const unsigned char *uuid) @@ -154,10 +158,12 @@ const char *str_uuid(const unsigned char *uuid) return str; } +#ifdef GFS2_HAS_UUID void gfs2_print_uuid(const unsigned char *uuid) { print_it(" uuid", "%s", NULL, str_uuid(uuid)); } +#endif void gfs2_sb_print(struct gfs2_sb *sb) { @@ -175,7 +181,9 @@ void gfs2_sb_print(struct gfs2_sb *sb) pv(sb, sb_lockproto, "%s", NULL); pv(sb, sb_locktable, "%s", NULL); +#ifdef GFS2_HAS_UUID gfs2_print_uuid(sb->sb_uuid); +#endif } void gfs2_rindex_in(struct gfs2_rindex *ri, char *buf) diff --git a/gfs2/libgfs2/structures.c b/gfs2/libgfs2/structures.c index 8a7dc07..e5507ca 100644 --- a/gfs2/libgfs2/structures.c +++ b/gfs2/libgfs2/structures.c @@ -71,8 +71,9 @@ build_sb(struct gfs2_sbd *sdp, const unsigned char *uuid) sb.sb_root_dir = sdp->md.rooti->i_di.di_num; strcpy(sb.sb_lockproto, sdp->lockproto); strcpy(sb.sb_locktable, sdp->locktable); +#ifdef GFS2_HAS_UUID memcpy(sb.sb_uuid, uuid, sizeof(sb.sb_uuid)); - +#endif bh = bget(&sdp->buf_list, sdp->sb_addr); gfs2_sb_out(&sb, bh->b_data); brelse(bh, updated); diff --git a/gfs2/tool/sb.c b/gfs2/tool/sb.c index 5cd91eb..ccf4039 100644 --- a/gfs2/tool/sb.c +++ b/gfs2/tool/sb.c @@ -164,6 +164,7 @@ do_sb(int argc, char **argv) printf("new multihost format = %u\n", sb.sb_multihost_format); } +#ifdef GFS2_HAS_UUID } else if (strcmp(field, "uuid") == 0) { printf("current uuid = %s\n", str_uuid(sb.sb_uuid)); @@ -193,6 +194,7 @@ do_sb(int argc, char **argv) memcpy(sb.sb_uuid, uuid, 16); printf("new uuid = %s\n", str_uuid(sb.sb_uuid)); } +#endif } else if (strcmp(field, "all") == 0) { gfs2_sb_print(&sb); newval = FALSE;
reply other threads:[~2009-08-11 21:18 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20090811211807.5D9FA1201D6@lists.fedorahosted.org \ --to=rpeterso@fedoraproject.org \ --cc=cluster-cvs-relay@redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).