From owner-freebsd-arch Wed May 23 10:19:25 2001 Delivered-To: freebsd-arch@freebsd.org Received: from critter.freebsd.dk (beachchick.freebsd.dk [212.242.34.253]) by hub.freebsd.org (Postfix) with ESMTP id 4B4A937B422 for ; Wed, 23 May 2001 10:19:21 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.3/8.11.3) with ESMTP id f4NHJAm09641; Wed, 23 May 2001 19:19:10 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Garrett Wollman Cc: Brian Somers , freebsd-arch@FreeBSD.ORG Subject: Re: RFC: unit_list routines In-Reply-To: Your message of "Wed, 23 May 2001 13:16:10 EDT." <200105231716.NAA31092@khavrinen.lcs.mit.edu> Date: Wed, 23 May 2001 19:19:10 +0200 Message-ID: <9639.990638350@critter> From: Poul-Henning Kamp Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <200105231716.NAA31092@khavrinen.lcs.mit.edu>, Garrett Wollman write s: >< said: > >>> How does newbus allocate/manage unit numbers ? > >> I don't think it does. The only way to find out what's in use >> (AFAIK) is by looking at every specinfo in dev_hash.... > >You're looking in the wrong place again. > >This may have changed, but my recollection is that new-bus looks for >the greatest allocated unit number and then takes the next one. Since >this is initialization code, the fact that this is O(n^2) is of no >consequence. For pty and tun devices, this assumption may not hold... -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message