[PATCH] globalvar: allow running actions on set with globalvar_add_bool()

Sascha Hauer s.hauer at pengutronix.de
Fri Sep 18 05:44:36 EDT 2020


On Wed, Sep 16, 2020 at 03:54:09PM +0200, Ahmad Fatoum wrote:
> globalvar_add_simple_bool() and the other family of globalvars don't allow
> running a callback when the variable is set. This is a useful thing
> to have however for things like global.usbgadget.autostart=1.
> Provide a globalvar_add_bool() that accommodates this.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
> ---
>  common/globalvar.c  |  8 +++++---
>  include/globalvar.h | 14 +++++++++++---
>  2 files changed, 16 insertions(+), 6 deletions(-)

Applied, thanks

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list