[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: device detection
From: |
Andrew Clausen |
Subject: |
Re: device detection |
Date: |
Tue, 14 Nov 2000 23:57:17 +1100 |
Glenn McGrath wrote:
>
> I notice there is FIXME note around pde_devices_probe_all() in devices.
>
> Currently it just probes a static list of likely target devices, there
> are a couple of problems that i see here.
>
> 1) Whilst the static list of devices will cover most situations, it
> wont allways get all devices. Maybe im strange, but i have 6 ide
> channels.
Yep, agreed. Note: you can do:
# parted /dev/hdz
Or whatever, if you want. But, we should try to find all devices
that we can...
> 2) It wont work with devfs, devfs puts device handles in different
> positions.
Yep.
> It would be good if parted obtained an acurate list of devices from the
> OS.
Indeed.
> It could be done parsing /proc/devices or /proc/partitions, but this
> method will still fail if the kernel doesnt have /proc support compiled
> in.
/proc is always around, nowadays. Well, not always, but we can
force everyone to have it! Not unreasonable IMHO.
(OTOH, FreeBSD is a different story... /proc isn't the same
mess it is on Linux. /proc is a disgrace, IMHO. should be /kernel,
or something)
So, how should we parse /proc/partitions? We need to tell the
partition devices apart from the "real" ones. Can we simply
strip the numbers off, from the end?
Andrew Clausen
- device detection, Glenn McGrath, 2000/11/14
- Re: device detection,
Andrew Clausen <=