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
Post a Comment