From owner-freebsd-current Fri Aug 22 06:17:15 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id GAA07948 for current-outgoing; Fri, 22 Aug 1997 06:17:15 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id GAA07943 for ; Fri, 22 Aug 1997 06:17:12 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.5/8.6.9) id XAA25491; Fri, 22 Aug 1997 23:12:47 +1000 Date: Fri, 22 Aug 1997 23:12:47 +1000 From: Bruce Evans Message-Id: <199708221312.XAA25491@godzilla.zeta.org.au> To: mike@smith.net.au, phk@dk.tfs.com Subject: Re: LINT compile failure... Cc: current@FreeBSD.ORG Sender: owner-freebsd-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >The CVS repo is undergoing open-heart bypass surgery. Here's a diff; if >you don't hit it, I will tomorrow : > >--- nlpt.c.old Fri Aug 22 19:12:58 1997 >+++ nlpt.c Fri Aug 22 19:13:32 1997 >@@ -367,10 +367,10 @@ > > #ifdef DEVFS > /* XXX what to do about the flags in the minor number? */ >- sc->devfs_token = devfs_add_devswf(&nlpt_cdevsw, >+ lpt->devfs_token = devfs_add_devswf(&nlpt_cdevsw, > unit, DV_CHR, > UID_ROOT, GID_WHEEL, 0600, "nlpt%d", unit); >- sc->devfs_token_ctl = devfs_add_devswf(&nlpt_cdevsw, >+ lpt->devfs_token_ctl = devfs_add_devswf(&nlpt_cdevsw, > unit | LP_BYPASS, DV_CHR, > UID_ROOT, GID_WHEEL, 0600, "lpctl%d", unit); > #endif It still fails to compile here, due to bogus timeout_func_t casts. It is apparently based on an ancient version of lpt.c (before lpt.c was staticized). The renaming of sc to lpt guarantees that patches for lpt.c usually don't apply :-(. NetBSD seems to name pointers to the main driver data struct as `sc' for most drivers. This should simplify cloning of drivers even for dissimilar drivers. E.g., you wouldn't have had to change anything except maybe "lpt" to "nlpt" when you cut and pasted the above DEVFS support. Other bugs: 1. "lpctl" should be "nlpctl" in the above. 2. "[n]lpctl" is a stupid name (it doesn't contain the full "lpt" prefix). 3. The device name should not occur literally more than once in each driver. Bruce