aboutsummaryrefslogtreecommitdiff
path: root/sbin/fsck_ffs/inode.c
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2008-04-10 23:49:23 +0000
committerXin LI <delphij@FreeBSD.org>2008-04-10 23:49:23 +0000
commit14320f1e7f93a63a36dd0b005b0fd920d5a965c6 (patch)
treeb5f93f915b454019d2b6ae372ac45f5167ac1c67 /sbin/fsck_ffs/inode.c
parent30f94bb497151176787ea9bc2dc1059f67242cb9 (diff)
downloadsrc-14320f1e7f93a63a36dd0b005b0fd920d5a965c6.tar.gz
src-14320f1e7f93a63a36dd0b005b0fd920d5a965c6.zip
Add a new flag, '-C' which enables a special mode that is intended for
catastrophic recovery. Currently, this mode only validates whether a cylindergroup has good signature data, and prompts the user to decide whether to clear it as a whole. This mode is useful when there is data damage on a disk and you are working on copy of the original disk, as fsck_ffs(8) tends to abnormally exit in such case, as a last resort to recover data from the disk.
Notes
Notes: svn path=/head/; revision=178088
Diffstat (limited to 'sbin/fsck_ffs/inode.c')
-rw-r--r--sbin/fsck_ffs/inode.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sbin/fsck_ffs/inode.c b/sbin/fsck_ffs/inode.c
index b41d8430e81b..94c637ef7ae5 100644
--- a/sbin/fsck_ffs/inode.c
+++ b/sbin/fsck_ffs/inode.c
@@ -617,8 +617,7 @@ allocino(ino_t request, int type)
return (0);
cg = ino_to_cg(&sblock, ino);
getblk(&cgblk, cgtod(&sblock, cg), sblock.fs_cgsize);
- if (!cg_chkmagic(cgp))
- pfatal("CG %d: BAD MAGIC NUMBER\n", cg);
+ check_cgmagic(cg, cgp);
setbit(cg_inosused(cgp), ino % sblock.fs_ipg);
cgp->cg_cs.cs_nifree--;
switch (type & IFMT) {