summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2016-12-08 15:18:30 +0100
committerAleksander Morgado <aleksander@aleksander.es>2017-01-16 11:24:15 +0100
commit1e89dc58b92511f0f23dd792b9781c29347edfd6 (patch)
treed4ecca8f7d1334ab9eae2f171deadb9d208ff571
parentdda312149e93752a005e520617ab90ed9146d006 (diff)
downloadlibqmi-1e89dc58b92511f0f23dd792b9781c29347edfd6.tar.gz
qmi-firmware-update: error out if no device specified in any way
-rw-r--r--src/qmi-firmware-update/qfu-main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qmi-firmware-update/qfu-main.c b/src/qmi-firmware-update/qfu-main.c
index af768710..853b799c 100644
--- a/src/qmi-firmware-update/qfu-main.c
+++ b/src/qmi-firmware-update/qfu-main.c
@@ -498,6 +498,10 @@ print_help_examples (void)
static gboolean
validate_inputs (const char *manual)
{
+ if (!manual && !vid && !pid && !busnum && !devnum) {
+ g_printerr ("error: device not specified\n");
+ return FALSE;
+ }
if (manual && (vid != 0 || pid != 0)) {
g_printerr ("error: cannot specify device path and vid:pid lookup\n");
return FALSE;