cluster: RHEL6 - fsck.gfs2: Fix initialization error return codes
Bob Peterson
rpeterso at fedoraproject.org
Tue Jan 24 20:46:07 UTC 2012
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=f6c1b3a38d2b0824d6a7fbe888852835000add96
Commit: f6c1b3a38d2b0824d6a7fbe888852835000add96
Parent: 5726ffe21e9e5acb228891af0f9bc83dc5e9b82d
Author: Bob Peterson <rpeterso at redhat.com>
AuthorDate: Thu Jan 12 14:18:13 2012 -0600
Committer: Bob Peterson <rpeterso at redhat.com>
CommitterDate: Fri Jan 20 08:26:28 2012 -0600
fsck.gfs2: Fix initialization error return codes
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\n"),
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.\n"));
- 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\n"),
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\n"),
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\n"),
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)\n"));
- exit(-1);
+ exit(FSCK_ERROR);
}
ret = read_sb(sdp, 1);
if (ret < 0) {
More information about the cluster-commits
mailing list