diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2011-04-24 07:07:04 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2011-04-24 07:07:04 +0000 |
commit | 8f7e2bab3ba5c74d99383e30b0ff3cac76a78b23 (patch) | |
tree | bc7898311361012a951a691133bd7f617d39499b /sbin/fsck_ffs/pass1.c | |
parent | 91d26dce7eca92544b56e6ae5368222572aa23ac (diff) |
remove support for (very) old ffs on-disk formats; ok krw@ and no
objection form the usual suspects
Diffstat (limited to 'sbin/fsck_ffs/pass1.c')
-rw-r--r-- | sbin/fsck_ffs/pass1.c | 40 |
1 files changed, 1 insertions, 39 deletions
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 $ */ /* @@ -259,34 +259,6 @@ checkinode(ino_t inumber, struct inodesc *idesc) 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); |