On Wed, Dec 24, 2014 at 2:26 AM, Rugxulo <rugx...@gmail.com> wrote:

> Right now, I'm using my laptop. I do have a RUFUS USB stick lying
> around if you want me to test under raw FreeDOS, but I'm not doing
> anything unusual with drives. In other words, my testing is limited in
> usefulness. But I have been playing with a (heavily modified) QEMU
> image of my own making in the last week or so.
>
> ====================================
> Drives     Drive information tool
> v1.0       2007 - 2015 by Mercury0x000d
> [mercury0x0...@no.spam.no.spam.gmail.spam.sux.]
>
> Detected drives: 4
>
>    type
> label         additional data (if applicable)
> a: floppy drive                NO NAME                  3.5 inch, 1440 KB
> c: hard drive                  NO NAME
> d: hard drive                  QEMU VVFAT
> g: not detected
> ====================================
>
> A:\ is a (very slightly) modified METADOS floppy .img.
> C:\ is a new (100 MB, qcow2) hard drive .img that I'm using to test
> some random stuff.
> D:\ is just a virtual drive that lets me read/write files (when rarely
> needed) to/from host OS. ("-drive file=fat:rw:/rugxulo/tmp/rugxdos")
> G:\ is my RAM disk (formerly using Jack's RDISK, now temporarily using
> SHSURDRV only because I might rarely unload it instead of rebooting).
>
> The labels for them are (in order): META_DOS, (none), QEMU VVFAT, and
> SCRATCH.
>
> Just for comparison, there are two other (obvious) programs I know of
> to detect drives.
>
> 1).
> http://ericauer.cosmodata.virtuaserver.com.br/soft/specials/volinfxl-disk-usage-info.zip
>
> 2). http://www.bttr-software.de/forum/board_entry.php?id=6721#p6723
>
> http://www.delorie.com/bin/cvsweb.cgi/djgpp/src/libc/compat/mntent/mntent.c?rev=1.13
>
> The former is written in Turbo Pascal (with source, natch). Though it
> ignores drives with no label or "MS-RAMDRIVE" (and apparently also
> ignores floppy).
>
> The latter is just a discussion we had a few years back where I
> mentioned DJGPP's mntent.c (although you're presumably still using
> PowerBASIC here, and I have no idea how much raw DJGPP support
> FreeBASIC has, though it does have a fair bit since it's obviously
> based upon it, so I don't know if using FBC instead is ultra
> transparent here with its bindings).
>
> mntent.c -DTEST (from djlsr203.zip since I only have an old GCC 2.95.3
> / 2.03p2 installed, for now) doesn't list sizes (presumably see df.exe
> from /v2gnu/fil41b.zip or whatever) but does list label, type (e.g.
> fd, hd, ram), and number (00,02,03,06) plus letter (a,c,d,g).
>
> Either way, they should give you some ideas.


Thanks for that! I see it didn't detect the RAM drive, which doesn't
surprise me. At the time this code was originally written I hadn't found
(or looked much, for that matter) an adequate test to determine if a drive
is in fact a RAM drive. All I've really done with Drives is extract the
"drives" command from my old shell, port it to QBASIC and make it a
standalone program - I haven't really done much to upgrade how the program
operates from 7 years ago. Actually, had I noticed there were already a
couple other similar programs already out there, I probably wouldn't have
bothered. And here I thought I was being original! lol

In the update I'll have to add RAM disk detection and support for 32
drives, as Travis suggested.

Again, thanks for the feedback :)
------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to