summaryrefslogtreecommitdiffstats
path: root/src/devicedb.h
AgeCommit message (Collapse)AuthorFilesLines
41 hoursMove device database to data/devices.txt with user-extensible device filesGravatar Nikias Bassen1-0/+36
The device table is now maintained in data/devices.txt (one device per line, "#!format 1" header) and the built-in table src/devices.c is generated from it at build time by data/gen-devices.sh. At runtime the built-in table is merged with, in order, <pkgdatadir>/devices.txt and ~/.libirecovery/devices.txt (%APPDATA%\libirecovery on Windows, or $LIBIRECOVERY_DEVICE_DB). Entries are matched by hardware_model; later files override earlier ones. User files must be owned by the user (or root) and not world-writable. Add irecv_devices_add() which appends an entry to the user device file so applications can register new models without rebuilding the library. If no display name is given, an existing entry keeps its name and a new one is named "<product_type> (<hardware_model>)". Adding is refused if another hardware_model already uses the same chip and board ID.