From cfafd66933bfd9fd55c58d7f8fa9f468386ba385 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Wed, 6 Apr 2016 12:16:21 -0700 Subject: libupload: don't error out because the tftp functions are unavailable Provide weak stubs for the case where the tftp functions aren't available. This prevents link failures for the case of running on top of non-network cores. Signed-off-by: H. Peter Anvin --- core/fs/pxe/tftp.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'core') diff --git a/core/fs/pxe/tftp.h b/core/fs/pxe/tftp.h index 8802914e..82ef64a5 100644 --- a/core/fs/pxe/tftp.h +++ b/core/fs/pxe/tftp.h @@ -53,6 +53,7 @@ #define TFTP_ERESOLVE htons(9) // Not in RFC, internal usage #define TFTP_ECONNECT htons(10) // Not in RFC, internal usage #define TFTP_OK htons(11) // Not in RFC, internal usage +#define TFTP_NONETWORK htons(12) // Not in RFC, internal usage struct tftp_error { uint16_t opcode; @@ -61,5 +62,6 @@ struct tftp_error { } __attribute__ (( packed )); int tftp_put(struct url_info *url, int flags, struct inode *inode, - const char **redir, char *data, int data_length); + const char **redir, char *data, int data_length); + #endif /* PXE_TFTP_H */ -- cgit v1.2.3