2 ms·
The problems are: "what file?", "what format?", "merge data from multiple files". Not sure if relevant to this discussion, but here's the problems I've experie
by deepsun 2y ago
The problems are: "what file?", "what format?", "merge data from multiple files".
Not sure if relevant to this discussion, but here's the problems I've experienced working with files for system devices:
[1] here's just a discovery of a logitech mouse receiver, notice that it touches:
* /sys/class/*
* /sys/module/*
* /sys/class/hidraw/*/device/driver
I must take care that each dir might not be present, symlinks may be dangling, and access to multiple files is not atomic.
It would be much easier and stable using just one SQLite query, for example.
[1] https://github.com/Lekensteyn/ltunify/blob/master/ltunify.c#L1164 https://github.com/Lekensteyn/ltunify/blob/master/ltunify.c#...