Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/fsck_ffs Dammit, get rid of the debugging abort() calls...



details:   https://anonhg.NetBSD.org/src/rev/d870e324bda8
branches:  trunk
changeset: 580589:d870e324bda8
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Apr 30 20:24:32 2005 +0000

description:
Dammit, get rid of the debugging abort() calls. It is no fun to have a broken
fsck program on a busted filesystem.

diffstat:

 sbin/fsck_ffs/inode.c |  9 +++------
 sbin/fsck_ffs/pass1.c |  8 ++++----
 2 files changed, 7 insertions(+), 10 deletions(-)

diffs (74 lines):

diff -r c354782d132b -r d870e324bda8 sbin/fsck_ffs/inode.c
--- a/sbin/fsck_ffs/inode.c     Sat Apr 30 16:38:21 2005 +0000
+++ b/sbin/fsck_ffs/inode.c     Sat Apr 30 20:24:32 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: inode.c,v 1.51 2005/01/20 15:29:40 xtraeme Exp $       */
+/*     $NetBSD: inode.c,v 1.52 2005/04/30 20:24:32 christos Exp $      */
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)inode.c    8.8 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: inode.c,v 1.51 2005/01/20 15:29:40 xtraeme Exp $");
+__RCSID("$NetBSD: inode.c,v 1.52 2005/04/30 20:24:32 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -107,7 +107,6 @@
                                    idesc->id_number, idesc->id_number);
                                pfatal("DIRECTORY %s: CONTAINS EMPTY BLOCKS I",
                                    pathbuf);
-                               abort();
                                if (reply("ADJUST LENGTH") == 1) {
                                        dp = ginode(idesc->id_number);
                                        DIP(dp, size) = iswap64(i *
@@ -394,10 +393,8 @@
        static union dinode *dp;
        union dinode *ret;
 
-       if (inumber != nextino++ || inumber > lastvalidinum) {
-               abort();
+       if (inumber != nextino++ || inumber > lastvalidinum)
                errx(EEXIT, "bad inode number %d to nextinode", inumber);
-       }
 
        if (inumber >= lastinum) {
                readcnt++;
diff -r c354782d132b -r d870e324bda8 sbin/fsck_ffs/pass1.c
--- a/sbin/fsck_ffs/pass1.c     Sat Apr 30 16:38:21 2005 +0000
+++ b/sbin/fsck_ffs/pass1.c     Sat Apr 30 20:24:32 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pass1.c,v 1.36 2005/01/20 15:29:40 xtraeme Exp $       */
+/*     $NetBSD: pass1.c,v 1.37 2005/04/30 20:24:32 christos Exp $      */
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)pass1.c    8.6 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: pass1.c,v 1.36 2005/01/20 15:29:40 xtraeme Exp $");
+__RCSID("$NetBSD: pass1.c,v 1.37 2005/04/30 20:24:32 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -152,7 +152,7 @@
                if (info == NULL) {
                        pfatal("cannot alloc %u bytes for inoinfo\n",
                            (unsigned)(sizeof(struct inostat) * inosused));
-                       abort();
+                       exit(EEXIT);
                }
                inostathead[c].il_stat = info;
                /*
@@ -188,7 +188,7 @@
                if (info == NULL) {
                        pfatal("cannot alloc %u bytes for inoinfo\n",
                            (unsigned)(sizeof(struct inostat) * inosused));
-                       abort();
+                       exit(EEXIT);
                }
                memmove(info, inostathead[c].il_stat, inosused * sizeof(*info));
                free(inostathead[c].il_stat);



Home | Main Index | Thread Index | Old Index