Date: Mon, 06 Mar 2000 19:51:57 -0500 From: Glen Mann <gmann@cyberia.com> To: Dave Wells <wellsian@caffeine.com> Cc: questions@FreeBSD.ORG Subject: Re: Getting DOS Volume Label Message-ID: <38C452AD.26117881@cyberia.com> References: <Pine.BSF.4.21.0003050659140.6344-100000@boris.netgate.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?38C452AD.26117881>