* Tollef Fog Heen <[EMAIL PROTECTED]> [2002-09-13 10:02]:
> * Michael Cardenas 
> 
> | Great! Where should I look? Is it part of anna? 
> 
> No, there is something in the attic of tools/ddetect

There are, at least, two methods for hard drive detection.
* with parted
* with discover

For parted, you can look at the source of partprobe
parted-1.6.3/partprobe/partprobe.c
and in autopartkit
debian-installer/tools/autopartkit/autopartkit.c

For libdiscover, you can look here :
discover-1.5/lib/disk.c
or in 
http://cvs.debian.org/debian-installer/tools/ddetect/Attic/diskdetect.c

Discover parse /proc/* entry.
parted use ioctl to find disks.

I don't know what is the best tool, and if they work fine on others archs,
and on Debian GNU/Hurd and Debian/xBSD.

And last thing, next version of discover (discover2) will use better
approach to these problems : there will be a generic api and different
functions for each OS. Yan can find some old devel sources at :

http://hackers.progeny.com/discover/releases/

and release status at :

http://hackers.progeny.com/discover/status/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to