#include <ipxe/dhcp.h>
#include <ipxe/uri.h>
#include <ipxe/profile.h>
+#include <ipxe/errortab.h>
#include <ipxe/tftp.h>
/** @file
#define EINVAL_MC_INVALID_PORT __einfo_error ( EINFO_EINVAL_MC_INVALID_PORT )
#define EINFO_EINVAL_MC_INVALID_PORT __einfo_uniqify \
( EINFO_EINVAL, 0x07, "Invalid multicast port" )
+#define ENOENT_NOT_FOUND __einfo_error ( EINFO_ENOENT_NOT_FOUND )
+#define EINFO_ENOENT_NOT_FOUND __einfo_uniqify \
+ ( EINFO_ENOENT, 0x01, "Not found" )
/**
* A TFTP request
static struct profiler tftp_server_profiler __profiler =
{ .name = "tftp.server" };
+/** Human-readable error messages */
+struct errortab tftp_errors[] __errortab = {
+ __einfo_errortab ( EINFO_ENOENT_NOT_FOUND ),
+};
+
/**
* Free TFTP request
*
*/
static int tftp_errcode_to_rc ( unsigned int errcode ) {
switch ( errcode ) {
- case TFTP_ERR_FILE_NOT_FOUND: return -ENOENT;
+ case TFTP_ERR_FILE_NOT_FOUND: return -ENOENT_NOT_FOUND;
case TFTP_ERR_ACCESS_DENIED: return -EACCES;
case TFTP_ERR_ILLEGAL_OP: return -ENOTTY;
default: return -ENOTSUP;