Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2003-03

Finding floppy

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Tony Maro

I'm having difficulty automatically locating a user's floppy drive.

Can someone suggest the best way to find the path to the floppy?

I've tried a couple of static ifpathexists() but it's ugly and isn't finding the floppy on Knoppix for some reason, even though one of the hard-coded checks is the default floppy location on Knoppix.

Surely there's an easier or more correct way to do this without having to find fstab and parse it? Sometimes the flexibility of Linux pisses me off ;-)

Thanks,

Tony Maro http://tony.maro.net/ Check out my software "CheckBook Tracker" A GPL (free) replacement for Microsoft Money!

Reply by email

Unknown author
to Tony Maro
Tony Maro wrote 11 lines
I'm having difficulty automatically locating a user's floppy drive. Can someone suggest the best way to find the path to the floppy? I've tried a couple of static ifpathexists() but it's ugly and isn't finding the floppy on Knoppix for some reason, even though one of the hard-coded checks is the default floppy location on Knoppix. Surely there's an easier or more correct way to do this without having to find fstab and parse it? Sometimes the flexibility of Linux pisses me off ;-)

fstab is your best shot anyway.
I would recommend making this a configuration option of your program, with default values obtained at installation from fstab.

The mount point can be anything really, so even this value is not to be trusted 100%, that is why I think the user should be able to configure it.

Michael.

Reply by email