summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Mork <bjorn@mork.no>2016-08-19 16:29:29 +0200
committerAleksander Morgado <aleksander@aleksander.es>2016-08-29 12:52:50 +0200
commit9038f49f3c8462e73a78744c8584448329e8f5d8 (patch)
tree4d6109f28f60780dda57ee0ceb959b15895b89f1
parent417a1fea69cb522026224aa8e66f7f083cc0a3c8 (diff)
downloadlibqmi-9038f49f3c8462e73a78744c8584448329e8f5d8.tar.gz
qmicli: report which new images the firmware expects to download
Signed-off-by: Bjørn Mork <bjorn@mork.no>
-rw-r--r--src/qmicli/qmicli-dms.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/qmicli/qmicli-dms.c b/src/qmicli/qmicli-dms.c
index 485b7340..5ff7dddc 100644
--- a/src/qmicli/qmicli-dms.c
+++ b/src/qmicli/qmicli-dms.c
@@ -2799,6 +2799,7 @@ select_stored_image_ready (QmiClientDms *client,
{
QmiMessageDmsSetFirmwarePreferenceOutput *output;
GError *error = NULL;
+ GArray *array;
output = qmi_client_dms_set_firmware_preference_finish (client, res, &error);
if (!output) {
@@ -2829,6 +2830,25 @@ select_stored_image_ready (QmiClientDms *client,
"\n",
qmi_device_get_path_display (ctx->device));
+ /* do we need to download a new modem and/or pri image? */
+ if (qmi_message_dms_set_firmware_preference_output_get_image_download_list (output, &array, &error)) {
+ guint i;
+ GString *images;
+ QmiDmsFirmwareImageType *type;
+
+ images = g_string_new ("");
+ for (i = 0; i < array->len; i++) {
+ type = &g_array_index (array, QmiDmsFirmwareImageType, i);
+ g_string_append (images, qmi_dms_firmware_image_type_get_string (*type));
+ if (i < array->len -1)
+ g_string_append (images, ", ");
+ }
+ if (array->len)
+ g_print ("\tAfter reset, the modem will wait in QDL mode for new firmware.\n"
+ "\tImages to download: '%s'\n\n", images->str);
+ g_string_free (images, TRUE);
+ }
+
qmi_message_dms_set_firmware_preference_output_unref (output);
operation_shutdown (TRUE);
}