qmicli fails when device is a valid symlink
When a valid symlink to a device node exists, qmicli still fails to determine the driver and wwan interface corresponding to the dereferenced symlink. This is due to using the -d argument's basename as an index into sysfs.
uptowngirl $ ls -l /dev/cdc-huawei lrwxrwxrwx 1 root root 8 Mar 4 02:02 /dev/cdc-huawei -> cdc-wdm0 uptowngirl $ sudo qmicli -d /dev/cdc-huawei -w [04 Mar 2019, 02:16:05] -Warning ** [/dev/cdc-huawei] couldn't load driver of cdc-wdm port error: couldn't open the QmiDevice: Cannot automatically select QMI/MBIM mode: driver unknown uptowngirl $
I've added code to check for a symlink, and dereference it if so, and issued a pull request at https://github.com/freedesktop/libqmi/pull/1. Since it looks like this is the primary repository, though, I'm making an issue and posting the patch here, as well. Please merge. Thanks!