From owner-cvs-all@FreeBSD.ORG Sat Feb 21 12:29:53 2004 Return-Path: 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 B04DA16A4CE; Sat, 21 Feb 2004 12:29:53 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A9FE943D2D; Sat, 21 Feb 2004 12:29:53 -0800 (PST) (envelope-from phk@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i1LKTrGe090924; Sat, 21 Feb 2004 12:29:53 -0800 (PST) (envelope-from phk@repoman.freebsd.org) Received: (from phk@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i1LKTr8i090923; Sat, 21 Feb 2004 12:29:53 -0800 (PST) (envelope-from phk) Message-Id: <200402212029.i1LKTr8i090923@repoman.freebsd.org> From: Poul-Henning Kamp Date: Sat, 21 Feb 2004 12:29:53 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/conf majors src/sys/dev/nmdm nmdm.c src/sys/dev/snp snp.c src/sys/kern kern_conf.c src/sys/net if_tap.c if_tapvar.h if_tun.c if_tunvar.h src/sys/sys conf.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Feb 2004 20:29:53 -0000 phk 2004/02/21 12:29:53 PST FreeBSD src repository Modified files: sys/conf majors sys/dev/nmdm nmdm.c sys/dev/snp snp.c sys/kern kern_conf.c sys/net if_tap.c if_tapvar.h if_tun.c sys/sys conf.h Removed files: sys/net if_tunvar.h Log: Device megapatch 2/6: This commit adds a couple of functions for pseudodrivers to use for implementing cloning in a manner we will be able to lock down (shortly). Basically what happens is that pseudo drivers get a way to ask for "give me the dev_t with this unit number" or alternatively "give me a dev_t with the lowest guaranteed free unit number" (there is unfortunately a lot of non-POLA in the exact numeric value of this number, just live with it for now) Managing the unit number space this way removes the need to use rman(9) to do so in the drivers this greatly simplifies the code in the drivers because even using rman(9) they still needed to manage their dev_t's anyway. I have taken the if_tun, if_tap, snp and nmdm drivers through the mill, partly because they (ab)used makedev(), but mostly because together they represent three different problems for device-cloning: if_tun and snp is the plain case: just give me a device. if_tap has two kinds of devices, with a flag for device type. nmdm has paired devices (ala pty) can you can clone either of them. Revision Changes Path 1.195 +0 -3 src/sys/conf/majors 1.18 +85 -84 src/sys/dev/nmdm/nmdm.c 1.83 +12 -18 src/sys/dev/snp/snp.c 1.142 +129 -8 src/sys/kern/kern_conf.c 1.34 +35 -129 src/sys/net/if_tap.c 1.5 +2 -1 src/sys/net/if_tapvar.h 1.132 +61 -100 src/sys/net/if_tun.c 1.11 +0 -55 src/sys/net/if_tunvar.h (dead) 1.180 +9 -0 src/sys/sys/conf.h