From owner-freebsd-current Sun May 21 10:58:30 2000 Delivered-To: freebsd-current@freebsd.org Received: from grimreaper.grondar.za (grimreaper.grondar.za [196.7.18.138]) by hub.freebsd.org (Postfix) with ESMTP id AF87E37B54F for ; Sun, 21 May 2000 10:58:21 -0700 (PDT) (envelope-from mark@grondar.za) Received: from grimreaper.grondar.za (localhost [127.0.0.1]) by grimreaper.grondar.za (8.9.3/8.9.3) with ESMTP id TAA17130; Sun, 21 May 2000 19:57:41 +0200 (SAST) (envelope-from mark@grimreaper.grondar.za) Message-Id: <200005211757.TAA17130@grimreaper.grondar.za> To: Peter Wemm Cc: Doug Rabson , current@FreeBSD.ORG Subject: Re: Major device numbers and mem device redesign References: <20000521144928.B30681CE1@overcee.netplex.com.au> In-Reply-To: <20000521144928.B30681CE1@overcee.netplex.com.au> ; from Peter Wemm "Sun, 21 May 2000 07:49:28 MST." Date: Sun, 21 May 2000 19:57:41 +0200 From: Mark Murray Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Yes. Each instance of make_dev() takes a cdevsw argument for the minor numbe r > in question. So, you could have /dev/mem read/write/ioctl etc routines > for major 2, minor 0 and 1, while have minors 3 and 4 being installed with > their own open/close/read/write/etc routines. > > Devices are looked up as a hash of major+minor, and the devsw entries from > that point on. OK - how do the switch (minor(dev)) { /* stuff */' default: return ENXIO; } cases get handled? By the hashing routine? Can these be hunted down and killed? M -- Mark Murray Join the anti-SPAM movement: http://www.cauce.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message