Date: Fri, 16 Aug 2002 16:31:49 -0700 (PDT) From: Nate Lawson <nate@root.org> To: dmk <gh@over-yonder.net> Cc: Robert Watson <rwatson@freebsd.org>, freebsd-current@freebsd.org Subject: Re: emulators/rtc and vmware2 Message-ID: <Pine.BSF.4.21.0208161630330.43982-100000@root.org> In-Reply-To: <20020816230831.GD35400@over-yonder.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 16 Aug 2002, dmk wrote: > On Thu, 15 Aug 2002, dmk wrote: > > > > Is anybody successfully using the port emulators/rtc with vmware2 on > > -current? > [...] > > On Thu, Aug 15, 2002 at 01:36:46PM -0400 Robert Watson wrote: > > My recollection is that the problem relates to calling make_dev() from the > > attach routine, and attach from the open call, and of course you can't > > open before you make_dev with devfs. Someone needs to restructure the > > driver to match some our other pseudo-device drivers where the device is > > properly created as part of module initialization. > [...] > > Robert N M Watson FreeBSD Core Team, TrustedBSD Projects > > robert@fledge.watson.org Network Associates Laboratories > > The attached diff effectively restructures the rtc device driver to > perform the make_dev() at module load. The driver may have problems, but > it does work, and, unlike the first diff, doesn't segfault on unload. ;-) > > (I don't claim to write C or hack kernels, so this presented as-is in Generally it's more appropriate to do cdevsw_add() in module init and then make_dev() in each open. That's the ONLY way to do it if you have multiple instances of a device (e.g. BPF). -Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0208161630330.43982-100000>