From owner-freebsd-audit Tue Jan 16 9:19:22 2001 Delivered-To: freebsd-audit@freebsd.org Received: from gratis.grondar.za (grouter.grondar.za [196.7.18.65]) by hub.freebsd.org (Postfix) with ESMTP id 589BC37B400 for ; Tue, 16 Jan 2001 09:19:01 -0800 (PST) Received: from grondar.za (root@gratis.grondar.za [196.7.18.133]) by gratis.grondar.za (8.11.1/8.11.1) with ESMTP id f0GHIdI33308; Tue, 16 Jan 2001 19:18:41 +0200 (SAST) (envelope-from mark@grondar.za) Message-Id: <200101161718.f0GHIdI33308@gratis.grondar.za> To: mjacob@feral.com Cc: audit@FreeBSD.ORG, "Justin T. Gibbs" Subject: Re: getting rid of that pesky "driver mistake" message from scsi_da... References: In-Reply-To: ; from Matthew Jacob "Mon, 15 Jan 2001 15:56:01 PST." Date: Tue, 16 Jan 2001 19:18:43 +0200 From: Mark Murray Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Looks fine to me. I had to do he same thing in my code. M > 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 > -- Mark Murray Warning: this .sig is umop ap!sdn To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message