diff options
| author | Michael I. Bushnell <mib@gnu.org> | 1994-10-14 02:46:06 +0000 |
|---|---|---|
| committer | Michael I. Bushnell <mib@gnu.org> | 1994-10-14 02:46:06 +0000 |
| commit | d4c8209635a6d104f643139aa0f8436a627bed2e (patch) | |
| tree | bae70a88df677533e34b825469597de258aaae3b | |
| parent | 08628f092564705b648fa4cf9f017169b58cf627 (diff) | |
entered into RCS
| -rw-r--r-- | ufs-fsck/pass3.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/ufs-fsck/pass3.c b/ufs-fsck/pass3.c index 1d366f21..2af148ee 100644 --- a/ufs-fsck/pass3.c +++ b/ufs-fsck/pass3.c @@ -18,6 +18,9 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include "fsck.h" + +void pass3 () { struct dirinfo *dnp; @@ -26,7 +29,7 @@ pass3 () /* Mark all the directories that can be found from the root. */ - statemap[ROOTINO] != DIR_REF; + inodestate[ROOTINO] |= DIR_REF; do { @@ -35,8 +38,8 @@ pass3 () { dnp = dirsorted[nd]; if (dnp->i_parent - && inodestate[dnp->i_parent] == (DIR | DIR_REF) - && inodestate[dnp->i_number] == DIR) + && inodestate[dnp->i_parent] == (DIRECTORY | DIR_REF) + && inodestate[dnp->i_number] == DIRECTORY) { inodestate[dnp->i_number] |= DIR_REF; change = 1; @@ -52,9 +55,10 @@ pass3 () if (dnp->i_parent == 0) { - assert (!(inodestate[dnp->i_number] & DIR_REF)); + if (inodestate[dnp->i_number] & DIR_REF) + errexit ("ORPHANED DIR MARKED WITH CONNECT"); pwarn ("UNREF DIR"); - pinode (number); + pinode (dnp->i_number); if (preen) printf (" (RECONNECTED)"); if (preen || reply ("RECONNECT")) |
