Messages in this thread | | | Date | Thu, 24 Jun 2004 13:59:37 -0700 | From | Greg KH <> | Subject | Re: [PATCH] PPC64 iSeries viodasd proc file |
| |
On Wed, Jun 23, 2004 at 08:38:10PM -0400, Jeff Garzik wrote: > >But what you can use is the MODULE_DEVICE_TABLE() information in the > >modules to try to help you out here. That details a mapping of what > >kind of devices that specific driver supports. > > No, it details what devices a driver supports, not what _type_ of > devices the driver supports.
Yes, you are correct.
> >>Note: this should not mean that we then go and remove currently > >>existing stuff in /proc. Deprecate it and then it can go away in time > >>as people switch. Having to have a flag day is very painful. It's > >>far easier to deprecate in one stable series with a new interface > >>available and then start removing the old ones as things start to > >>switch over. If it really is an improvement, then getting people to > >>change won't be difficult. > > > > > >I agree, I don't think that many things have disappeared from /proc just > >yet, right? You should just have more information than what you > >previously did, right? Or did scsi drop their /proc support fully? > > Concrete example: modprobe sx8. Now, what block devices did it detect?
Could we determine this in 2.4?
Anyway, how about this assuming sx8 is a pci driver: - look in /sys/bus/pci/drivers/sx8/ - for every device listed in that directory do: - `tree | grep block` or however you want to search the tree for the block symlink, find is probably nicer here. - that gives you the base block device, then go into the /sys/block/FOUND_BLOCK_DEVICE to find the individual partitions if needed.
Or work backwards if you want to: - tally up every /sys/block/*/device symlink, and see if they point to a device owned by the sx8 driver.
Does that work for you?
thanks,
greg k-h - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |