[SLOF] [PATCH 4/9] libnet: Put code for determing TFTP error strings into a separate function
Greg Kurz
groug at kaod.org
Fri May 18 22:03:14 AEST 2018
On Fri, 18 May 2018 13:46:37 +0200
Thomas Huth <thuth at redhat.com> wrote:
> On 18.05.2018 12:47, Greg Kurz wrote:
> > On Thu, 17 May 2018 19:40:51 +0200
> > Thomas Huth <thuth at redhat.com> wrote:
> >
> >> This way we can easily re-use the rc --> string translation in later
> >
> > ... which also translates rc into other numerical values. Per curiosity, are
> > these -103, -104 ... values explained somewhere ?
>
> Not that I'm aware of. At least the Forth code simply does this with the
> error value in the obp-tftp package:
>
> net-load dup 0< IF drop 0 THEN
>
Well, since netload() already outputs errors to the console, it looks like
it could just return -1.
> I think the original author of the code just might have tried to return
> a unique error number for each error case, so that the error codes from
> the TFTP function had to be translated into something else for the final
> return value... Anyway, I did not want to touch this logic while
> refactoring the code.
>
Fair enough.
> Thomas
More information about the SLOF
mailing list