Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!ut-sally!husc6!bu-cs!bucsb.bu.edu!madd From: madd@bucsb.bu.edu.UUCP (Jim "Jack" Frost) Newsgroups: comp.sys.ibm.pc Subject: Re: number of DOS drives Message-ID: <649@bucsb.bu.edu.UUCP> Date: Tue, 9-Dec-86 19:05:39 EST Article-I.D.: bucsb.649 Posted: Tue Dec 9 19:05:39 1986 Date-Received: Wed, 10-Dec-86 04:45:52 EST References: <2268@sdcsvax.UCSD.EDU> <623@bucsb.bu.edu.UUCP> <1450@isis.UUCP> <630@bucsb.bu.edu.UUCP> <2230@eagle.ukc.ac.uk> Reply-To: madd@bucsb.bu.edu.UUCP (Jim "Jack" Frost) Organization: ODO (Organization for the Disorganization of Organization) Lines: 25 Keywords: egad! Mood: Edgy In article <2230@eagle.ukc.ac.uk> rde@ukc.ac.uk (R.D.Eager) writes: > >I have been following the discussion of how to discover number of >drives, with interest. I may have missed something, and I agree there >are portability issues, but how about using one of the techniques for >looking at the device driver chain (you know, open NUL and grab the link >to the next driver, etc.)? > >This works even if third party drives, 20 floppies, etc. are >fitted. Just count the number of block device drivers... Umm...this does work. Now. But I wouldn't be counting on it indefinitely, since MS-DOS does NOT have to put NUL at the beginning of the list. Also, you should be careful -- are all "block" device drivers accessible as drives? I tend to doubt it -- I think that several multitasking/multiprocessor cards use a block type device driver to control the card, or at least to pass it stuff. On your average system it should work right now, though. -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - Jim Frost * The Madd Hacker - UUCP: ..!harvard!bu-cs!bucsb!madd | ARPANET: madd@bucsb.bu.edu CSNET: madd%bucsb@bu-cs | BITNET: cscc71c@bostonu -------------------------------+---+------------------------------------ "Oh beer, oh beer." -- Me | [=(BEER) <- Bud the Beer (cheers!)