Gitweb:
http://git.fedorahosted.org/git/gfs2-utils.git?p=gfs2-utils.git;a=commitd...
Commit: 61c1a2ba81b7cd7f529261055e9f74af1722d141
Parent: f910f288e063ccb64df90c8dff371bffdd4a8620
Author: Steven Whitehouse <swhiteho(a)redhat.com>
AuthorDate: Wed Nov 30 14:57:54 2011 +0000
Committer: Steven Whitehouse <swhiteho(a)redhat.com>
CommitterDate: Wed Nov 30 14:57:54 2011 +0000
libgfs2: Remove some more log_xxx calls
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(a)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;