On Mon, Oct 04, 2010 at 10:56:10AM -0400, Davidlohr Bueso wrote: > These series of patches add a new command, devinfo(1), which aids > users to quickly get details of any linux device. > > I have been using this program for my own purpose for some time now > and thought that it might be a useful addition. Thanks that you share your program with community. > There is room for improvements and suggestions, so please let me know. > > Some examples: > $ devinfo /dev/video0 > Character device: `video0' (81:0) Class: video4linux Access: crw-rw---- > Name: Integrated Camera Driver: `uvcvideo' > Type: usb_interface I have doubts that there is any demand for such output. We already have lshw, lspci, stat, ... > # devinfo /dev/sda > Block device: `sda' (8:0) Class: sd Access: brw-rw---- > Fabricant: ATA HITACHI HTS54502 Driver: `sd' > Type: disk (read-write, non-removable) > Partitions (3): > #1: 468518912 Linux > #2: 19873794 Extended > #5: 19873792 Linux swap / Solaris This belongs to fdisk or partx (rewrite partx to use libblkid is still in my TODO list...). Note that you need root permissions to parse partition tables. We shouldn't forget that all such information are already gathered by udev and all this is accessible for non-root users, try: udevadm info --query=all --name=sda1 maybe it would be better to create a new command with human readable output for udev db rather than write all from scratch. > $ devinfo -b > DEVICE MAJOR:MINOR > sr > ââsr0 11:0 > ramdisk > ââram0 1:0 > ââram1 1:1 > ââram10 1:10 > ââram11 1:11 > ââram12 1:12 > ... Nice, Milan Broz is working on a new command called "lsblk", the command will be able to print tree of block devices (with slaves/holders dependencies) -- something like "dmsetup ls --tree" but for all block devices and with more information. I guess we will see Milan's git tree ASAP, and then we can help him with new features (for example some features from your devinfo prototype). Karel -- Karel Zak <kzak@xxxxxxxxxx> http://karelzak.blogspot.com -- To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html