From owner-freebsd-current Fri Aug 16 16:59:58 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DBE0937B400; Fri, 16 Aug 2002 16:59:55 -0700 (PDT) Received: from hardtime.linuxman.net (hardtime.linuxman.net [66.147.26.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8284543E3B; Fri, 16 Aug 2002 16:59:54 -0700 (PDT) (envelope-from gh@over-yonder.net) Received: from mortis.over-yonder.net (localhost [127.0.0.1]) by hardtime.linuxman.net (8.11.6/8.11.6) with ESMTP id g7H0G8j01002; Fri, 16 Aug 2002 19:16:09 -0500 Received: by mortis.over-yonder.net (Postfix, from userid 1012) id EA0381F04; Fri, 16 Aug 2002 18:59:45 -0500 (CDT) Date: Fri, 16 Aug 2002 18:59:45 -0500 From: dmk To: Nate Lawson Cc: Robert Watson , freebsd-current@freebsd.org Subject: Re: emulators/rtc and vmware2 Message-ID: <20020816235945.GF35400@over-yonder.net> References: <20020816230831.GD35400@over-yonder.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i-fullermd.1 X-Editor: vi X-OS: FreeBSD Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, Aug 16, 2002 at 04:31:49PM -0700 I heard the voice of Nate Lawson, and lo! it spake thus: > On Fri, 16 Aug 2002, dmk wrote: [...] > > 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). Yes, but... ;-) That way doesn't work with VMware. The restructured way does. Unfortunately, I don't know enough about what's going on to fix it the Right Way, which I presume would involve fixing VMware. Can anyone suggest where I should be looking? > -Nate dan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message