From owner-freebsd-audit Mon Jan 15 15:56:24 2001 Delivered-To: freebsd-audit@freebsd.org Received: from feral.com (feral.com [192.67.166.1]) by hub.freebsd.org (Postfix) with ESMTP id 5CA3C37B401 for ; Mon, 15 Jan 2001 15:56:05 -0800 (PST) Received: from zeppo.feral.com (IDENT:mjacob@zeppo [192.67.166.71]) by feral.com (8.9.3/8.9.3) with ESMTP id PAA09111; Mon, 15 Jan 2001 15:56:02 -0800 Date: Mon, 15 Jan 2001 15:56:01 -0800 (PST) From: Matthew Jacob Reply-To: mjacob@feral.com To: audit@FreeBSD.ORG Cc: "Justin T. Gibbs" Subject: Re: getting rid of that pesky "driver mistake" message from scsi_da... In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Going once.... > > Index: cam/scsi/scsi_da.c > =================================================================== > RCS file: /home/ncvs/src/sys/cam/scsi/scsi_da.c,v > retrieving revision 1.61 > diff -u -r1.61 scsi_da.c > --- cam/scsi/scsi_da.c 2001/01/08 00:32:51 1.61 > +++ cam/scsi/scsi_da.c 2001/01/14 23:26:43 > @@ -127,6 +127,7 @@ > struct disk_params params; > struct disk disk; > union ccb saved_ccb; > + dev_t dev; > }; > > struct da_quirk_entry { > @@ -899,6 +899,9 @@ > cam_extend_release(daperiphs, periph->unit_number); > xpt_print_path(periph->path); > printf("removing device entry\n"); > + if (softc->dev) { > + disk_destroy(softc->dev); > + } > free(softc, M_DEVBUF); > } > > @@ -1048,7 +1051,7 @@ > /* > * Register this media as a disk > */ > - disk_create(periph->unit_number, &softc->disk, 0, > + softc->dev = disk_create(periph->unit_number, &softc->disk, 0, > &da_cdevsw, &dadisk_cdevsw); > > /* > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-audit" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message