api: expose ignored ports as MM_MODEM_PORT_TYPE_IGNORED

At the moment, ignored ports show up as (unknown) in the ports list
in mmcli. This makes it look like something went wrong while probing.

Actually ModemManager already tracks unknown and ignored ports separately
(MM_PORT_TYPE_UNKNOWN vs MM_PORT_TYPE_IGNORED) but the API always exposes
them as MM_MODEM_PORT_TYPE_UNKNOWN.

Add MM_MODEM_PORT_TYPE_IGNORED and use this for ignored ports so they
show up as (ignored) instead in mmcli.
This commit is contained in:
Stephan Gerhold
2020-10-30 09:26:24 +01:00
committed by Aleksander Morgado
parent fb14d0dbb2
commit a174edb74d
2 changed files with 5 additions and 1 deletions
+2
View File
@@ -538,6 +538,7 @@ typedef enum { /*< underscore_name=mm_modem_band >*/
* @MM_MODEM_PORT_TYPE_QMI: QMI port.
* @MM_MODEM_PORT_TYPE_MBIM: MBIM port.
* @MM_MODEM_PORT_TYPE_AUDIO: Audio port. Since 1.12.
* @MM_MODEM_PORT_TYPE_IGNORED: Ignored port. Since 1.16.
*
* Type of modem port.
*
@@ -552,6 +553,7 @@ typedef enum { /*< underscore_name=mm_modem_port_type >*/
MM_MODEM_PORT_TYPE_QMI = 6,
MM_MODEM_PORT_TYPE_MBIM = 7,
MM_MODEM_PORT_TYPE_AUDIO = 8,
MM_MODEM_PORT_TYPE_IGNORED = 9,
} MMModemPortType;
/**