what meaning of command function return val
When write a command function do_xxx.
When all right it should return zero.
But when error, It should return a negtive value or a positive value? And what difference between neg-val and pos-val?
Signature · 9 lines
Best Regards, zzs _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Quoted 6 lines · 张忠山
When write a command function
do_xxx.When all right it should return zero.
But when error, It should return a negtive value or a positive value? And what difference between neg-val and pos-val?
Traditionally only positive error values were supported. This was changed recently so you can return negative error codes now. The difference is that with negative error values barebox will print a string representation of the error code. If that's suitable for your command I suggest to return negative codes.
Sascha
Signature · 9 lines
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 [email protected] http://lists.infradead.org/mailman/listinfo/barebox