[U-Boot] [PATCH] Add error codes/handling for TFTP-server

Ben Warren
2009-11-10T06:30:00Z

Remy Bohmer wrote:
> Signed-off-by: Remy Bohmer <linux@bohmer.net>
> ---
> net/tftp.c | 32 +++++++++++++++++++++++++++++---
> 1 files changed, 29 insertions(+), 3 deletions(-)
>
> diff --git a/net/tftp.c b/net/tftp.c
> index cc60a3b..d254f49 100644
> --- a/net/tftp.c
> +++ b/net/tftp.c
> @@ -47,6 +47,16 @@ static int TftpTimeoutCountMax = TIMEOUT_COUNT;
> ulong TftpRRQTimeoutMSecs = TIMEOUT;
> int TftpRRQTimeoutCountMax = TIMEOUT_COUNT;
>
> +enum {
> + TFTP_ERR_UNDEFINED = 0,
> + TFTP_ERR_FILE_NOT_FOUND = 1,
> + TFTP_ERR_ACCESS_DENIED = 2,
> + TFTP_ERR_DISK_FULL = 3,
> + TFTP_ERR_UNEXPECTED_OPCODE = 4,
> + TFT_ERR_UNKNOWN_TRANSFER_ID = 5,
>
Applied to net/next after fixing typo in last enum

regards,
Ben