From 8f7e2bab3ba5c74d99383e30b0ff3cac76a78b23 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Sun, 24 Apr 2011 07:07:04 +0000 Subject: remove support for (very) old ffs on-disk formats; ok krw@ and no objection form the usual suspects --- sbin/fsck_ffs/pass1.c | 40 +--------------------------------------- 1 file changed, 1 insertion(+), 39 deletions(-) (limited to 'sbin/fsck_ffs/pass1.c') diff --git a/sbin/fsck_ffs/pass1.c b/sbin/fsck_ffs/pass1.c index 52e2c9af228..dfd37bea54c 100644 --- a/sbin/fsck_ffs/pass1.c +++ b/sbin/fsck_ffs/pass1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pass1.c,v 1.34 2011/04/16 16:37:21 otto Exp $ */ +/* $OpenBSD: pass1.c,v 1.35 2011/04/24 07:07:03 otto Exp $ */ /* $NetBSD: pass1.c,v 1.16 1996/09/27 22:45:15 christos Exp $ */ /* @@ -258,34 +258,6 @@ checkinode(ino_t inumber, struct inodesc *idesc) if (mode == IFBLK || mode == IFCHR) ndb++; if (mode == IFLNK) { - /* - * Note that the old fastlink format always had di_blocks set - * to 0. Other than that we no longer use the `spare' field - * (which is now the extended uid) for sanity checking, the - * new format is the same as the old. We simply ignore the - * conversion altogether. - mycroft, 19MAY1994 - */ - if (sblock.fs_magic == FS_UFS1_MAGIC && doinglevel2 && - DIP(dp, di_size) > 0 && - DIP(dp, di_size) < MAXSYMLINKLEN_UFS1 && - DIP(dp, di_blocks) != 0) { - symbuf = alloca(secsize); - if (bread(fsreadfd, symbuf, - fsbtodb(&sblock, DIP(dp, di_db[0])), - (long)secsize) != 0) - errexit("cannot read symlink\n"); - if (debug) { - symbuf[DIP(dp, di_size)] = 0; - printf("convert symlink %d(%s) of size %llu\n", - inumber, symbuf, - (unsigned long long)DIP(dp, di_size)); - } - dp = ginode(inumber); - memcpy(dp->dp1.di_shortlink, symbuf, - (long)DIP(dp, di_size)); - DIP_SET(dp, di_blocks, 0); - inodirty(); - } /* * Fake ndb value so direct/indirect block checks below * will detect any garbage after symlink string. @@ -349,16 +321,6 @@ checkinode(ino_t inumber, struct inodesc *idesc) } else SET_ISTATE(inumber, FSTATE); SET_ITYPE(inumber, IFTODT(mode)); - if (sblock.fs_magic == FS_UFS1_MAGIC && doinglevel2 && - (dp->dp1.di_ouid != (u_short)-1 || - dp->dp1.di_ogid != (u_short)-1)) { - dp = ginode(inumber); - DIP_SET(dp, di_uid, dp->dp1.di_ouid); - dp->dp1.di_ouid = -1; - DIP_SET(dp, di_gid, dp->dp1.di_ogid); - dp->dp1.di_ogid = -1; - inodirty(); - } badblk = dupblk = 0; idesc->id_number = inumber; (void)ckinode(dp, idesc); -- cgit v1.2.3