Re: Bootchooser has unexpected changes of variable 'remaining_attempts'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Tue, Aug 01, 2017 at 04:02:32PM +0200, Norbert Wiedmann wrote:
> after debugging a while, I found the reason:
> In file bootchooser.c, in funktion bootchooser_save(..) the call of
> 
> ret = pr_setenv(bc, "%s.remaining_attempts=%d",
>                 target->state_prefix,
>                 target->remaining_attempts);
> creates a "xxx.remaining_attempts=-1" if the variable 'remaining_attempts'
> is 0xffffffff, for example.
> 
> The type of remaining_attempts is unsigned int.
> 
> After changing the function call to
>  
> ret = pr_setenv(bc, "%s.remaining_attempts=%lu",   /* changed %d to %lu */
>                 target->state_prefix,
>                 target->remaining_attempts);
> it works fine.
> Maybe this could be fixed..., thank you.

Could you make a proper patch out of your proposal and send it here to
the mailing list? This is the usual way how change requests are reviewed
and discussed in barebox.

Thank you,

rsc
-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux