Simulates a USB device, a moment can be considered as U disk, the data stored in a device, file, driver installation is complete will create a data file, one computer can install more such devices,
Problem: each device has its own data file, how to make the second, third device to create a data file, do not conflict with the first, it does not read error after reading,
CodePudding user response:
If it is a real USB devices, data is equipment, restart your computer, data is not lost, I now is by driving virtual device, data cannot be always in memory, save changes each time data is written to the file,
CodePudding user response:
If it is real U disk device, insert in turn, will be in accordance with the accumulation of thoughts in turn is assigned sda, SDB, SDC... Sdaa, So if two identical U disk, finally to distinguish the is done by UUID
If it is a virtual device, then the data save file actually can also see a similar idea, to create their corresponding file: 1. If the simple rely on load order, then after load order messed up when a file with the situation of the equipment 2. The equipment load is depend on the custom fake equipment resources, then the definition of hardware resources are consistent, if you load the equipment all information is consistent, in fact, there is no distinction between the concept of, if not, when creating file, should add the information to distinguish