From: Paul Traina Date: Fri, 17 Jun 1994 16:57:03 +0000 (+0000) Subject: From: Gill Kloepfer Jr. X-Git-Tag: FreeBSD-release/1.1.5~62 X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/commitdiff_plain/883cb6bc27f6847561ce4fc53ec032e84baff3cf From: Gill Kloepfer Jr. Verified by: pst > The DIOCSBAD ioctl sets a bad block table (is almost suredly called by > the bad144 utility) and changes the memory-resident bad block table. The > problem is that bad144intern() is not called after the "disk" structure has > been changed, so that the internal bad144 table will become out-of-sync with > the one in the disk structure. --- diff --git a/sys/i386/isa/wd.c b/sys/i386/isa/wd.c index 2626f61bde..5d9bf91f45 100644 --- a/sys/i386/isa/wd.c +++ b/sys/i386/isa/wd.c @@ -37,7 +37,7 @@ static int wdtest = 0; * SUCH DAMAGE. * * from: @(#)wd.c 7.2 (Berkeley) 5/9/91 - * $Id: wd.c,v 1.38 1994/04/20 07:06:44 davidg Exp $ + * $Id: wd.c,v 1.39 1994/06/07 01:36:39 phk Exp $ */ /* TODO: @@ -1278,8 +1278,10 @@ wdioctl(dev_t dev, int cmd, caddr_t addr, int flag) case DIOCSBAD: if ((flag & FWRITE) == 0) error = EBADF; - else + else { du->dk_bad = *(struct dkbad *)addr; + bad144intern(du); + } break; case DIOCGDINFO: