uqmi: add slot number to uim-sim-status output
authorDavid Bauer <mail@david-bauer.net>
Sat, 28 Oct 2023 23:01:46 +0000 (01:01 +0200)
committerDavid Bauer <mail@david-bauer.net>
Sun, 29 Oct 2023 23:00:33 +0000 (00:00 +0100)
Add the SIM-card slot-number to uim-sim-status output.

Signed-off-by: David Bauer <mail@david-bauer.net>
commands-uim.c

index ff01d7b4a6204bb38da0d7286957831bb8c73555..b29c46438bc599ad69c1265c1ace1c02a8f01517 100644 (file)
@@ -110,6 +110,7 @@ static void cmd_uim_get_sim_state_cb(struct qmi_dev *qmi, struct qmi_request *re
                if (card_application_state > QMI_UIM_CARD_APPLICATION_STATE_READY)
                        card_application_state = QMI_UIM_CARD_APPLICATION_STATE_UNKNOWN;
 
+               blobmsg_add_u32(&status, "card_slot", i + 1); /* Slot is idx + 1 */
                blobmsg_add_string(&status, "card_application_state", card_application_states[card_application_state]);
                blobmsg_add_string(&status, "pin1_status", get_pin_status(pin1_state));
                blobmsg_add_u32(&status, "pin1_verify_tries", pin1_retries);