c - What is the equivalent of IOCTL_STORAGE_QUERY_PROPERTY on linux? -


i trying hard drives serial number on linux without need root access. possible on windows via this source in essence deviceiocontrol ioctl_storage_query_property. ioctl version?

you can ask udev, without needing root permissions. try command , note id_serial line:

/sbin/udevadm info --query=property --name /dev/sda 

programatically you'd use libudev.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

javascript - addthis share facebook and google+ url -

ios - Show keyboard with UITextField in the input accessory view -