I have problem in my c program which is transferring/copying data to/from /dev/sda and /dev/sdb.(open, read, write) Both devices are USB pendrives and their Major number is 8.
The problem i have is that minor numbers change exactly like the sda sdb names så after reboot i often write/read from/to the wrong one as the /dev/name become assigned to other device.
To make it more complicated the both USB devices are both connected to same USB bus (Raspberry Pi has only one) and have same size. What is different is the manufacturer name.
How to check the difference in c?
thanks in advance.
udev
and/sys/
and perhaps/proc/mounts
and other files under/proc/
– Basile Starynkevitch