FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 11-30-2011, 02:04 PM
Steven Whitehouse
 
Default 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@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.
");
+ fprintf(stderr, "next_rg_meta: Start block is outside rgrp bounds.
");
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.
");
+ 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.
");
+ errno = E2BIG;
return -1;
}
sdp->fssize = lseek(sdp->device_fd, 0, SEEK_END) / sdp->sd_sb.sb_bsize;
--
1.7.4.4
 

Thread Tools




All times are GMT. The time now is 08:54 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org