From owner-freebsd-questions Mon Mar 6 16:51:52 2000 Delivered-To: freebsd-questions@freebsd.org Received: from smtp2.supernet.com (smtp2.desupernet.net [204.249.184.45]) by hub.freebsd.org (Postfix) with SMTP id 7861237BD54 for ; Mon, 6 Mar 2000 16:51:48 -0800 (PST) (envelope-from gmann@cyberia.com) Received: (qmail 4459 invoked from network); 7 Mar 2000 00:51:43 -0000 Received: from 96-49.tnt-1.york.supernet.com (HELO cyberia.com) (208.157.96.49) by smtp2.supernet.com with SMTP; 7 Mar 2000 00:51:43 -0000 Message-ID: <38C452AD.26117881@cyberia.com> Date: Mon, 06 Mar 2000 19:51:57 -0500 From: Glen Mann Organization: Phrantic Physics X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 3.4-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: Dave Wells Cc: questions@FreeBSD.ORG Subject: Re: Getting DOS Volume Label References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG It looks like 0x2600 will grab a directory entry (I'm too lazy to figure that out for real), which if bit 3 in attributes is set, is a volume label. The volume label is actually in location 0x2B. Thanks for jump-starting my brain. Get some sleep! :) Dave Wells wrote: > > Whoops. Make that rfd0 so you can read while it's mounted. You're right, > formatting seems weird or broken. Or I just need some sleep... > > On Sun, 5 Mar 2000, Glen Mann wrote: > > > wellsian wrote: > > > > > > I'm sure there's a less geekish method, but this works: > > > > > > hd -n 11 -s 0x2600 /dev/fd0 > > > > > > Dave > > > > Geekish? On Unix? This is beautiful. I used > > > > hd -n 11 -s 0x2600 /dev/fd0 | awk -F\| ' NR==1 {print $2}' > > > > to get the volume label. Couldn't get the hd format strings to work, hence > > awk. This does not work if the floppy is mounted though. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message