qmi-firmware-update: small fixes

Christophe Ronco c.ronco-externe at kerlink.fr
Mon Jan 16 11:05:26 UTC 2017


Hi,


First, thanks for your work, this is great!

I tried a firmware upgrade of a MC7304 using qmi-firmware-update and it 
worked (at least PRI has been upgraded). I made some very small code 
modifications to do that and:

  - I don't know how to send them (git-email maybe)

  - I don't know the coding rules on libqmi project


Here are my modifications:

 From 6cd93b7bdc5296427f99ef601d9419a2b641635c Mon Sep 17 00:00:00 2001
From: Christophe Ronco <c.ronco at kerlink.fr>
Date: Mon, 16 Jan 2017 11:29:37 +0100
Subject: [PATCH 1/2] qmi-firmware-update: fix compilation inside yocto

In Yocto, build is done outside source directory.
Without this patch, generated enum files are empty.
---
  src/qmi-firmware-update/Makefile.am | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/qmi-firmware-update/Makefile.am 
b/src/qmi-firmware-update/Makefile.am
index a54a8c3..04f928c 100644
--- a/src/qmi-firmware-update/Makefile.am
+++ b/src/qmi-firmware-update/Makefile.am
@@ -29,9 +29,9 @@ qmi_firmware_update_CPPFLAGS = \
      $(NULL)

  ENUMS = \
-    qfu-image.h \
-    qfu-qdl-message.h \
-    qfu-dload-message.h \
+    $(top_srcdir)/src/qmi-firmware-update/qfu-image.h \
+    $(top_srcdir)/src/qmi-firmware-update/qfu-qdl-message.h \
+    $(top_srcdir)/src/qmi-firmware-update/qfu-dload-message.h \
      $(NULL)

  ENUMS_GENERATED = \
-- 
2.11.0

 From bc0a9812299df7d846846378569c6d3843ee2128 Mon Sep 17 00:00:00 2001
From: Christophe Ronco <c.ronco at kerlink.fr>
Date: Mon, 16 Jan 2017 11:39:37 +0100
Subject: [PATCH 2/2] qmi-firmware-update: small fix in udev event management

---
  src/qmi-firmware-update/qfu-udev-helpers.c | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/src/qmi-firmware-update/qfu-udev-helpers.c 
b/src/qmi-firmware-update/qfu-udev-helpers.c
index 47656db..61d40f6 100644
--- a/src/qmi-firmware-update/qfu-udev-helpers.c
+++ b/src/qmi-firmware-update/qfu-udev-helpers.c
@@ -347,6 +347,8 @@ device_matches_sysfs_and_type 
(GUdevDevice             *device,
      if (!udev_helper_get_udev_device_details (device,
&device_sysfs_path, NULL, NULL, NULL, NULL,
                                                NULL))
+        goto out;
+
      if (!device_sysfs_path)
          goto out;

-- 
2.11.0


Will you put qmi-firmware-update in next libqmi release?


Christophe




More information about the libqmi-devel mailing list