diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2016-12-08 15:18:30 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2017-01-16 11:24:15 +0100 |
commit | 1e89dc58b92511f0f23dd792b9781c29347edfd6 (patch) | |
tree | d4ecca8f7d1334ab9eae2f171deadb9d208ff571 | |
parent | dda312149e93752a005e520617ab90ed9146d006 (diff) | |
download | external_libqmi-1e89dc58b92511f0f23dd792b9781c29347edfd6.zip external_libqmi-1e89dc58b92511f0f23dd792b9781c29347edfd6.tar.gz external_libqmi-1e89dc58b92511f0f23dd792b9781c29347edfd6.tar.bz2 |
qmi-firmware-update: error out if no device specified in any way
-rw-r--r-- | src/qmi-firmware-update/qfu-main.c | 4 |
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 af76871..853b799 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; |