From: Steven Whitehouse <swhiteho@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 6/6] libgfs2: Remove some more log_xxx calls
Date: Wed, 30 Nov 2011 15:04:42 +0000 [thread overview]
Message-ID: <1322665482-28435-7-git-send-email-swhiteho@redhat.com> (raw)
In-Reply-To: <1322665482-28435-1-git-send-email-swhiteho@redhat.com>
One is changed to fprintf, on a temporary basis - really it should
be removed. The others are removed and an error code returned.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
---
gfs2/libgfs2/structures.c | 2 +-
gfs2/libgfs2/super.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/gfs2/libgfs2/structures.c b/gfs2/libgfs2/structures.c
index 8733444..0c22b01 100644
--- a/gfs2/libgfs2/structures.c
+++ b/gfs2/libgfs2/structures.c
@@ -511,7 +511,7 @@ static int __gfs2_next_rg_meta(struct rgrp_tree *rgd, uint64_t *block,
int i;
if (!first && (*block < rgd->ri.ri_data0)) {
- log_err("next_rg_meta: Start block is outside rgrp bounds.\n");
+ fprintf(stderr, "next_rg_meta: Start block is outside rgrp bounds.\n");
exit(1);
}
for (i = 0; i < length; i++){
diff --git a/gfs2/libgfs2/super.c b/gfs2/libgfs2/super.c
index c9a9ad3..37152c2 100644
--- a/gfs2/libgfs2/super.c
+++ b/gfs2/libgfs2/super.c
@@ -96,7 +96,7 @@ int read_sb(struct gfs2_sbd *sdp)
sdp->sd_heightsize[x] = space;
}
if (x > GFS2_MAX_META_HEIGHT){
- log_err("Bad max metadata height.\n");
+ errno = E2BIG;
return -1;
}
@@ -111,7 +111,7 @@ int read_sb(struct gfs2_sbd *sdp)
}
sdp->sd_max_jheight = x;
if(sdp->sd_max_jheight > GFS2_MAX_META_HEIGHT) {
- log_err("Bad max jheight.\n");
+ errno = E2BIG;
return -1;
}
sdp->fssize = lseek(sdp->device_fd, 0, SEEK_END) / sdp->sd_sb.sb_bsize;
--
1.7.4.4
next prev parent reply other threads:[~2011-11-30 15:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-30 15:04 [Cluster-devel] libgfs2 cleanups Steven Whitehouse
2011-11-30 15:04 ` [Cluster-devel] [PATCH 1/6] libgfs2: Move generic_interrupt() into utils Steven Whitehouse
2011-11-30 15:04 ` [Cluster-devel] [PATCH 2/6] libgfs2: Move gfs2_getch " Steven Whitehouse
2011-11-30 15:04 ` [Cluster-devel] [PATCH 3/6] libgfs2: Prepare to remove log_xxx() macros from library Steven Whitehouse
2011-11-30 15:04 ` [Cluster-devel] [PATCH 4/6] libgfs2: Move some debug messages out into mkfs/fsck Steven Whitehouse
2011-11-30 15:04 ` [Cluster-devel] [PATCH 5/6] libgfs2: Clean up sb read/check functions Steven Whitehouse
2011-11-30 15:04 ` Steven Whitehouse [this message]
2011-11-30 15:55 ` [Cluster-devel] libgfs2 cleanups Bob Peterson
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=1322665482-28435-7-git-send-email-swhiteho@redhat.com \
--to=swhiteho@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: link
Be 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 NNTP newsgroup(s).