aboutsummaryrefslogtreecommitdiff
path: root/rmi4update
diff options
context:
space:
mode:
authorVincent Huang <vincenthsw@gmail.com>2022-03-14 16:35:30 +0800
committerGitHub <noreply@github.com>2022-03-14 16:35:30 +0800
commit6940581af1507a177050fdd33c1847c1f9ba945c (patch)
treeb46fd02eef4c8affba46bd566d173fea79d58eac /rmi4update
parente4e724250700867ef142a34cb38c41bc97b597fa (diff)
parent7f553ab32a9f7096c8d041bc8cf79533a4cb3ff2 (diff)
downloadrmi4utils-6940581af1507a177050fdd33c1847c1f9ba945c.tar.gz
Merge branch 'master' into BLv10
Diffstat (limited to 'rmi4update')
-rwxr-xr-xrmi4update/main.cpp14
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);