Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!gem.mps.ohio-state.edu!lavaca.uh.edu!uhnix1!sugar!peter From: peter@sugar.hackercorp.com (Peter da Silva) Newsgroups: comp.sys.amiga.tech Subject: Re: Anybody know how to do this stuff? Message-ID: <4730@sugar.hackercorp.com> Date: 10 Dec 89 22:30:29 GMT References: <13920020@hpfelg.HP.COM> <13920027@hpfelg.HP.COM> Reply-To: peter@sugar.hackercorp.com (Peter da Silva) Organization: Sugar Land Unix - Houston Lines: 18 In article <13920027@hpfelg.HP.COM> koren@hpfelg.HP.COM (Steve Koren) writes: > I want to find out, for any given device name, whether that is a currently > mounted file system device. There are two parts to this question. First, whether it's a file-system device. Second, whether it's currently mounted. The second is easy... you can just set your pr_windowptr to -1 and try to access it. To see if it's a file system device is a bit harder. You can try doing a getdiskinfo on it. Or you can traverse the device list and kill two birds with one stone. Let me dig up the code... Bummer. That disk has an error. I'll run disksalv on it while I read news and let you know what comes out. (let's see you do *that* on a Mac!) -- Peter "Have you hugged your wolf today" da Silva `-_-' 'U` "I haven't lost my mind, it's backed up on tape somewhere"