From owner-freebsd-current Thu Aug 12 3:48: 3 1999 Delivered-To: freebsd-current@freebsd.org Received: from critter.freebsd.dk (wandering-wizard.cybercity.dk [212.242.41.238]) by hub.freebsd.org (Postfix) with ESMTP id 0EDD315705 for ; Thu, 12 Aug 1999 03:48:00 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.9.3/8.9.2) with ESMTP id LAA00358; Thu, 12 Aug 1999 11:10:53 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Assar Westerlund Cc: current@FreeBSD.ORG Subject: Re: DEV_MODULE doesn't support dynamic major numbers any longer? In-reply-to: Your message of "12 Aug 1999 04:57:07 +0200." <5lyafhyad8.fsf@assaris.sics.se> Date: Thu, 12 Aug 1999 11:10:53 +0200 Message-ID: <356.934449053@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <5lyafhyad8.fsf@assaris.sics.se>, Assar Westerlund writes: >It seems to be the case that the possibility of specifying a major >number of NOMAJ in DEV_MODULE has vanished. The cmaj and bmaj in DEV_MODULE are only used for ordering the drivers, and otherwise with no significance. You should store your majors in your cdevsw structure. I don't particular like the concept of DEV_MODULE registrating the cdevsw by magic. >cdevsw_add() doesn't have any code for handling NOMAJ any longer. >(The only mention I can find of NOMAJ in a -current kernel tree from >19990811 are these: >which makes me wonder how the promcons works...). Fine, see above. >Is this intentional that there isn't there any support for dynamically >assigning major device numbers or is it an accident that I should go >and rectify? The previous code was a hack and inflicted problems. The right solution, (until DEVFS of course) is to add two new functions: alloc_cmaj() and alloc_bmaj() and use those. -- Poul-Henning Kamp FreeBSD coreteam member phk@FreeBSD.ORG "Real hackers run -current on their laptop." FreeBSD -- It will take a long time before progress goes too far! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message