[fprint] [PATCH] imgdev: add support for FP_IMGDRV_NEEDS_REACTIVATION_BETWEEN_ENROLLS flag
Marco Trevisan (TreviƱo)
mail at 3v1n0.net
Fri Feb 16 13:08:11 UTC 2018
Hi Igor,
2018-02-16 8:58 GMT+01:00 Igor Filatov <ia.filatov at gmail.com>:
> I think it would be better if libfprint simply called dev_activate each time
> it needed an image, including each enroll step, and then called
> dev_deactivate when it's done. Drivers should know whether they need to
> reactivate or not. But this will require changes to all the drivers of the
> devices that return images... which should actually amount to a few deleted
> lines.
Yeah, well I thought about changing this in all the places, but I
didn't want to break drivers that I could not test, so I though this
was safer, although I recognize isn't the cleanest code. But if you
think this flag is acceptable, we can probably add helper functions to
keep this a bit nicer.
At the beginning I was doing this at my driver level (see
https://github.com/3v1n0/libfprint/commit/8cb5e6945cc26), but I didn't
like to keep it there (nor I wanted to introduce other flags for the
driver to keep the state, since imgdrv is supposed to do this already.
So, while I could go back to that solution, I'd really prefer not to
make the driver to handle such things.
And yes, having this flag to be more generic to ENROLL only is
something we can do too, let me know if there's any preference and I
can look into that.
More information about the fprint
mailing list