From owner-freebsd-current Sat Feb 3 19:20:44 2001 Delivered-To: freebsd-current@freebsd.org Received: from bazooka.unixfreak.org (bazooka.unixfreak.org [63.198.170.138]) by hub.freebsd.org (Postfix) with ESMTP id 268BE37B4EC; Sat, 3 Feb 2001 19:20:27 -0800 (PST) Received: by bazooka.unixfreak.org (Postfix, from userid 1000) id E43153E02; Sat, 3 Feb 2001 19:20:26 -0800 (PST) Received: from unixfreak.org (localhost [127.0.0.1]) by bazooka.unixfreak.org (Postfix) with ESMTP id E2C903C10B; Sat, 3 Feb 2001 19:20:26 -0800 (PST) To: John Baldwin Cc: Makoto MATSUSHITA , current@FreeBSD.org, phk@FreeBSD.org Subject: Re: doFS.sh should obey MDDEVICE if available In-Reply-To: Message from John Baldwin of "Sat, 03 Feb 2001 17:04:29 PST." Date: Sat, 03 Feb 2001 19:20:21 -0800 From: Dima Dorfman Message-Id: <20010204032026.E43153E02@bazooka.unixfreak.org> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Also, I think that this isn't the right fix to a bigger problem. > Instead, it shouldn't be hard to get a list of configured devices > out of mdconfig via an ioctl on /dev/mdctl. This would be the right > fix, as it would fix the general case problem you describe, not just > one instance of it. mdconfig wont' be able to tell you what file it > is attached to by filename, but it should be able to ask /dev/mdctl > for a list of devices and report at least the type of each device > (swap, file, etc.). I think I can do this, possibly with a little help. md(4) keeps a list of md_s structures. From these, I think you can fill in the majority (if not all) of the fields in an md_ioctl structure. I tried this, and I can successfully return one almost-filled md_ioctl structure. If someone can suggest a method for returning an arbitrary number of md_ioctl's (a list), I think I may be able to implement this. Any pointers? Thanks Dima Dorfman dima@unixfreak.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message