I have this dream about how we *should* name things in the
kernel..... but I won't bore you with that just now.
The relevant bit relates to how to map from an open-file-descriptor on
a device (or on a file on a filesystem on a device) to information
about that device.
The only piece of information we can currently get is the device
number (either st_rdev or st_dev).
Using the principle that
"All API extenstions should be done via special filesystems"
the answer has to be that there is filesystem-like-thing that maps
device numbers to their "True Identity".
/kernel/devno/3/1 -> /kernel/device/pci/0/00:1f.4/ide/0/0/pc_partition/1
Actually, I would prefer something like:
/kernel/devno/3/1 -> /kernel/disk/3/part/1
/kernel/disk/3/bus -> /kernel/ide/0
/kernel/ide/0/disk -> /kernel/disk/3
/kernel/ide/0/bus -> /kernel/pci/0/00:1f.4
/kernel/pci/0/00:1f.4/ide -> /kernel/ide/0
and they would be "devlinks", not "symlinks"... but I think I might be
beginning to bore you.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to firstname.lastname@example.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/