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 01-20-2012, 02:10 PM
 
Default fsck.gfs2: Fix initialization error return codes

From: Bob Peterson <rpeterso@redhat.com>

In initialize.c there are several places where it can exit with an error.
These places return with -1 where they should return the standard fsck
error FSCK_ERROR.

rhbz#675723
---
gfs2/fsck/initialize.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/gfs2/fsck/initialize.c b/gfs2/fsck/initialize.c
index 608eb32..7171cdd 100644
--- a/gfs2/fsck/initialize.c
+++ b/gfs2/fsck/initialize.c
@@ -466,13 +466,13 @@ static void lookup_per_node(struct gfs2_sbd *sdp, int allow_rebuild)
if (err) {
log_crit(_("Error rebuilding per_node directory: %s
"),
strerror(err));
- exit(-1);
+ exit(FSCK_ERROR);
}
}
gfs2_lookupi(sdp->master_dir, "per_node", 8, &sdp->md.pinode);
if (!sdp->md.pinode) {
log_err( _("Unable to rebuild per_node; aborting.
"));
- exit(-1);
+ exit(FSCK_ERROR);
}
}

@@ -579,7 +579,7 @@ static int init_system_inodes(struct gfs2_sbd *sdp)
if (err) {
log_crit(_("Error rebuilding inum inode: %s
"),
strerror(err));
- exit(-1);
+ exit(FSCK_ERROR);
}
gfs2_lookupi(sdp->master_dir, "inum", 4,
&sdp->md.inum);
@@ -611,7 +611,7 @@ static int init_system_inodes(struct gfs2_sbd *sdp)
if (err) {
log_crit(_("Error rebuilding statfs inode: %s
"),
strerror(err));
- exit(-1);
+ exit(FSCK_ERROR);
}
gfs2_lookupi(sdp->master_dir, "statfs", 6, &sdp->md.statfs);
if (!sdp->md.statfs) {
@@ -648,7 +648,7 @@ static int init_system_inodes(struct gfs2_sbd *sdp)
if (err) {
log_crit(_("Error rebuilding quota inode: %s
"),
strerror(err));
- exit(-1);
+ exit(FSCK_ERROR);
}
gfs2_lookupi(sdp->master_dir, "quota", 5, &sdp->md.qinode);
if (!sdp->md.qinode) {
@@ -1156,7 +1156,7 @@ static int fill_super_block(struct gfs2_sbd *sdp)

if (compute_constants(sdp)) {
log_crit(_("Bad constants (1)
"));
- exit(-1);
+ exit(FSCK_ERROR);
}
ret = read_sb(sdp, 1);
if (ret < 0) {
--
1.7.7.5
 

Thread Tools




All times are GMT. The time now is 01:20 AM.

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