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 <[email protected]> --- 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
