From owner-cvs-all Thu Feb 27 6:47:11 2003 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8281F37B401; Thu, 27 Feb 2003 06:47:09 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 538104405F; Thu, 27 Feb 2003 06:46:52 -0800 (PST) (envelope-from phk@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h1REkp0U085847; Thu, 27 Feb 2003 06:46:51 -0800 (PST) (envelope-from phk@repoman.freebsd.org) Received: (from phk@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h1REkpIk085846; Thu, 27 Feb 2003 06:46:51 -0800 (PST) Message-Id: <200302271446.h1REkpIk085846@repoman.freebsd.org> From: Poul-Henning Kamp Date: Thu, 27 Feb 2003 06:46:51 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern kern_conf.c src/sys/sys conf.h X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG phk 2003/02/27 06:46:51 PST Modified files: sys/kern kern_conf.c sys/sys conf.h Log: Add support for allocating a device driver major number on demand. To do this, initialize the d_maj member of the cdevsw to MAJOR_AUTO. When the cdevsw is first passed to make_dev() a free major number will be assigned. Until we have a bit more experience with this a printf will announce this fact. Major numbers are not reclaimed, so loading/unloading the same device driver which uses MAJOR_AUTO will eventually deplete the pool of free major numbers and the system will panic when it can not allocate one. Still undecided who to invonvenience with the solution to this. Revision Changes Path 1.125 +15 -2 src/sys/kern/kern_conf.c 1.165 +2 -0 src/sys/sys/conf.h To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message