[PATCH 3/5] core: allow disabling auto-scan and notifying ports one by one via API

Dan Williams dcbw at redhat.com
Fri Sep 30 03:56:08 UTC 2016


On Thu, 2016-09-29 at 15:39 +0200, Aleksander Morgado wrote:
> This commit enables a new core ModemManager daemon option, so that
> automatic
> detection of available modems is totally disabled: '--no-auto-scan'.
> Note that
> this option also replaces the previously used '--test-no-auto-scan'
> option,
> which was only used during tests.
> 
> Along with the new ModemManager option, a new ReportKernelEvent()
> method in
> the API is defined, which allows notifying the daemon of which
> interfaces it
> should be accessing, as well as the main details of each interface.
> The only
> mandatory parameters in the new method are 'action' (add/remove),
> 'name' (the
> name of the interface) and 'subsystem' (the subsystem of the
> interface).

Generally LGTM.  One thing I'm not clear on though.  For the
MMKernelUdevDevice, what does it need to keep the Properties object
around?  It seems like there's a lot of new complexity to first check
self->priv->device and if that doesn't exist then use self->priv-
>properties.

Shouldn't there always be a self->priv->device since it gets set during
object init?  Initialization is synchronous anyway...

I guess the question is, when will there not be a self->priv->device?

Dan


More information about the ModemManager-devel mailing list