diff options
author | David Chiu <dchiu@synaptics.com> | 2022-03-02 15:47:31 +0800 |
---|---|---|
committer | Vincent Huang <vincenthsw@gmail.com> | 2022-03-14 15:23:15 +0800 |
commit | 7f553ab32a9f7096c8d041bc8cf79533a4cb3ff2 (patch) | |
tree | 49f1e5cf1a73f6dd3770bb9d3ea49d40d85f87da /rmi4update | |
parent | e9115fa74a72e9a267ec6c08b8df8cd05d4f9085 (diff) | |
download | rmi4utils-7f553ab32a9f7096c8d041bc8cf79533a4cb3ff2.tar.gz |
Support debugging message in read/write
Diffstat (limited to 'rmi4update')
-rwxr-xr-x | rmi4update/main.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/rmi4update/main.cpp b/rmi4update/main.cpp index 38b1f77..386930f 100755 --- a/rmi4update/main.cpp +++ b/rmi4update/main.cpp @@ -36,7 +36,9 @@ #define VERSION_MINOR 3 #define VERSION_SUBMINOR 9 -#define RMI4UPDATE_GETOPTS "hfd:t:pclv" +#define RMI4UPDATE_GETOPTS "hfd:t:pclvm" + +bool needDebugMessage; void printHelp(const char *prog_name) { @@ -66,6 +68,9 @@ int GetFirmwareProps(const char * deviceFile, std::string &props, bool configid) rc = rmidevice.Open(deviceFile); if (rc) return rc; + + if (needDebugMessage) + rmidevice.m_hasDebug = true; // Clear all interrupts before parsing to avoid unexpected interrupts. rmidevice.ToggleInterruptMask(false); @@ -115,6 +120,7 @@ int main(int argc, char **argv) bool printFirmwareProps = false; bool printConfigid = false; bool performLockdown = false; + needDebugMessage = false; HIDDevice device; enum RMIDeviceType deviceType = RMI_DEVICE_TYPE_ANY; @@ -148,6 +154,9 @@ int main(int argc, char **argv) case 'v': printVersion(); return 0; + case 'm': + needDebugMessage = true; + break; default: break; @@ -195,6 +204,9 @@ int main(int argc, char **argv) return 1; } + if (needDebugMessage) { + device.m_hasDebug = true; + } RMI4Update update(device, image); rc = update.UpdateFirmware(force, performLockdown); |