From owner-freebsd-arch Sun Dec 23 0:39:17 2001 Delivered-To: freebsd-arch@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by hub.freebsd.org (Postfix) with ESMTP id 7983D37B416; Sun, 23 Dec 2001 00:39:14 -0800 (PST) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.6/8.11.6) with ESMTP id fBN8bAl61272; Sun, 23 Dec 2001 09:37:14 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: The Anarcat Cc: arch@FreeBSD.ORG, jkh@FreeBSD.ORG Subject: Re: sysctl kern.disks shouldn't have to sort its output In-Reply-To: Your message of "Sat, 22 Dec 2001 18:08:00 EST." <20011222230759.GD530@shall.anarcat.dyndns.org> Date: Sun, 23 Dec 2001 09:37:10 +0100 Message-ID: <61270.1009096630@critter.freebsd.dk> 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 <20011222230759.GD530@shall.anarcat.dyndns.org>, The Anarcat writes: >-- snip -- >revision 1.50.2.14 >date: 2001/09/18 06:47:30; author: jkh; state: Exp; lines: +2 -2 >Temporarily disable the use of kern.disks - it returns the disk >devices in the wrong order and causes them to be displayed out of >sequence in sysinstall. >To me, the sorting belongs to libdisk at most, or to the user app. ABSOLUTELY! >Of course, one might wonder why the entries in kern.disks are not >sorted. This, I do not know. It might depend on how the disks are >detected. For example, here, sysctl kern.disks gives: > >kern.disks: cd0 ad3 ad1 ad0 md0 The reason they are not sorted is that if userland wants them sorted, it can be trivially done, whereas nothing in the kernel wants them sorted and consequently sorting them in the kernel would be waste of time&space. Not to mention agreeing on what the _right_ sorting order would be: disk before CD/DVD ? SCSI before ATA ? Fixed before removable ? BIKESHED!!!! >Anyways. If the sorting belongs to the kernel, I could do it. don't. >However, I think it belongs to libdisk, so I'll start working on a patch >there. Yes, please do. That is what Jordan should have done (and was urged to) in the first place, but he was afraid that he would b0rk sysinstall doing so. Go figure. -- 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