On Thu, Aug 15, 2002 at 07:11:05AM -0500 I heard the voice of dmk, and lo! it spake thus: > > Is anybody successfully using the port emulators/rtc with vmware2 on > -current? [...]
Replying to myself... I have since hacked rtc so it works with vmware2 on my -CURRENT system dated February 4, 2002. In the shocking case that anyone is interested, I have attached the diff. (I would appreciate anybody looking at the diff as it is my first kernel hack.) > Thanks loads, dan
--- rtc.c.bk Thu Aug 15 03:50:21 2002 +++ rtc.c Thu Aug 15 03:51:30 2002 @@ -177,9 +177,8 @@ rtc_open(dev_t dev, int oflag, int otyp, struct proc *p) #endif { - struct rtc_softc *sc; + struct rtc_softc *sc = (struct rtc_softc *) dev->si_drv1; - sc = rtc_attach(dev); if (sc==NULL) return (EAGAIN); @@ -264,7 +263,21 @@ static int init_module(void) { -int error; + int error; + struct rtc_softc *sc; + dev_t dev; + + dev = make_dev(&rtc_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, DEVICE_NAME); + if(dev==NULL) + return (NULL); + + MALLOC(sc, struct rtc_softc*, sizeof(*sc), M_DEVBUF, M_WAITOK); + if(sc==NULL) + return NULL; + + bzero(sc, sizeof(*sc)); + rtc_sc = sc; + dev->si_drv1 = sc; /* Link together */ error = cdevsw_add(&rtc_cdevsw); if (error)