SIM power patch

Kasper Holtze kasper at
Fri Dec 16 13:03:01 UTC 2016

I have updated the patch - it is attached to this mail.

On 12/08/2016 03:49 PM, Aleksander Morgado wrote:
> On Thu, Dec 8, 2016 at 9:29 AM, Kasper Holtze <kasper at> wrote:
>>> +static QmiMessageUimPowerOnSimInput *
>>> +power_on_sim_input_create (guint slot)
>>> "guint8 slot" directly?
>> Yes - I need to create a helper function to parse the input as guint8, but I
>> can do that?
> No need for that, just use the standard helper returning a guint, and
> then if (value > G_MAXUINT8), return an error saying "invalid slot
> number" for example.
>>>> +
>>>> +        if (g_str_equal (power, "ON")) {
>>> Instead of g_str_equal() use !g_ascii_strcasecmp() and then you'll
>>> allow both ON and on.
>>> Declare "on" input here, and don't use camelCasedNames:
>>> QmiMessageUimPowerOnSimInput *input;
>>> Instead of g_str_equal() use !g_ascii_strcasecmp() and then you'll
>>> allow both OFF and off.
>> The reason I used upper case ON/OFF, was to follow the convention in the PIN
>> functions (--dms-uim-verify-pin=PIN,0000 for instance), but I can make it
>> lower case and accept both.
> Oh, well, PIN is an acronym. But I think we should really just avoid
> capital letters on every user input, just allow both.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Added-uim-sim-power-option-to-power-up-or-down-the-S.patch
Type: text/x-patch
Size: 9065 bytes
Desc: not available
URL: <>

More information about the libqmi-devel mailing list