[PATCH 0/3] uqmi: sync libqmi and add more diagnostic commands;

Koen Vandeputte koen.vandeputte at citymesh.com
Mon Nov 8 02:47:21 PST 2021


On 08.11.21 09:36, Koen Vandeputte wrote:
>
> On 24.10.21 17:05, Oskari Lemmela wrote:
>> First patch updates dynamic code generator to handle newer data from
>> libqmi project. After data is synced from libqmi project, more 
>> connection
>> diagnostic commands are added to uqmi.
>>
>> Oskari Lemmela (3):
>>    uqmi: update code generator
>>    uqmi: sync data from libqmi project
>>    uqmi: add more diagnostics commands
>>
>>   commands-nas.c            |  663 +++++++++++-
>>   commands-nas.h            |   10 +-
>>   commands-uim.c            |    8 +-
>>   commands-wda.c            |    3 +-
>>   commands-wds.c            |   16 +-
>>   commands-wds.h            |    2 +-
>>   data/gen-code.pl          |   11 +-
>>   data/gen-common.pm        |   10 +
>>   data/gen-error-list.pl    |    2 +-
>>   data/gen-header.pl        |    5 +-
>>   data/qmi-service-ctl.json |   40 +-
>>   data/qmi-service-dms.json |  533 +++++++---
>>   data/qmi-service-nas.json | 1703 +++++++++++++++++++++++++------
>>   data/qmi-service-oma.json |   52 +-
>>   data/qmi-service-pbm.json |   47 +-
>>   data/qmi-service-pds.json |  104 +-
>>   data/qmi-service-uim.json |  746 ++++++++++----
>>   data/qmi-service-wda.json |  144 ++-
>>   data/qmi-service-wds.json | 2039 +++++++++++++++++++++++++++++--------
>>   data/qmi-service-wms.json |  218 ++--
>
> I noticed the JSON files here seem edited compared to upstream to 
> avoid following original compile issue:  (variables starting with a 
> number)
>
>
> /Tools/QMI/qmi-message-nas.h:820:19: error: invalid suffix 
> "gpp_eons_plmn_name" on integer constant
>   820 |                 } 3gpp_eons_plmn_name;
>           |                   ^~~~~~~~~~~~~~~~~~~
>
> Maybe the perl scripts could be edited to simply prepend a "_" to 
> these vars to avoid the problem.
> This would allow to use unmodified upstream json files which is a lot 
> less work to update it in the future.
>
>
> Regards,
>
> Koen
>

Patch proposal:


diff --git a/data/gen-common.pm b/data/gen-common.pm
index e951776..278afce 100644
--- a/data/gen-common.pm
+++ b/data/gen-common.pm
@@ -32,6 +32,7 @@ sub gen_cname($) {
      my $name = shift;

      $name =~ s/[^a-zA-Z0-9_]/_/g;
+    $name = "_${name}" if $name =~ /^\d/;
      return lc($name);
  }


Regards,

Koen




More information about the openwrt-devel mailing list