From owner-freebsd-scsi Tue Oct 20 13:28:38 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA29263 for freebsd-scsi-outgoing; Tue, 20 Oct 1998 13:28:38 -0700 (PDT) (envelope-from owner-freebsd-scsi@FreeBSD.ORG) Received: from dingo.cdrom.com (dingo.cdrom.com [204.216.28.145]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA29250; Tue, 20 Oct 1998 13:28:34 -0700 (PDT) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (localhost.cdrom.com [127.0.0.1]) by dingo.cdrom.com (8.9.1/8.8.8) with ESMTP id NAA00961; Tue, 20 Oct 1998 13:32:52 -0700 (PDT) (envelope-from mike@dingo.cdrom.com) Message-Id: <199810202032.NAA00961@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: asami@FreeBSD.ORG (Satoshi Asami) cc: mike@smith.net.au, scsi@FreeBSD.ORG Subject: Re: for i in disks In-reply-to: Your message of "Tue, 20 Oct 1998 13:21:39 PDT." <199810202021.NAA19725@silvia.hip.berkeley.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 20 Oct 1998 13:32:51 -0700 From: Mike Smith Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > * Nah, it's actually pretty trivial. I would, indeed, just iterate over > * the available nodes in /dev. When devfs comes along, it'll just get > * more efficient. > > Well yes, but what I meant to say was that there are 96 available > nodes in /dev due to wired down devices, but the number in each > machine could be as little as 16. That's not very efficient. ;) I wouldn't be losing any sleep over as few as 80 failed system calls. How many times do you call select()? Seriously; trying to find any "better" solution is just silly. It's not as if it takes any time for the system to work out that the disk you've tried to open doesn't exist. If you get ENXIO then it's either not there or not online and you move on. -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message