summaryrefslogtreecommitdiff
path: root/boot/bootmeth_pxe.c
diff options
context:
space:
mode:
Diffstat (limited to 'boot/bootmeth_pxe.c')
-rw-r--r--boot/bootmeth_pxe.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/boot/bootmeth_pxe.c b/boot/bootmeth_pxe.c
index 05c6bece2c1..b91e61bcbc4 100644
--- a/boot/bootmeth_pxe.c
+++ b/boot/bootmeth_pxe.c
@@ -23,7 +23,8 @@
#include <pxe_utils.h>
static int extlinux_pxe_getfile(struct pxe_context *ctx, const char *file_path,
- char *file_addr, ulong *sizep)
+ char *file_addr, enum bootflow_img_t type,
+ ulong *sizep)
{
struct extlinux_info *info = ctx->userdata;
ulong addr;
@@ -34,7 +35,7 @@ static int extlinux_pxe_getfile(struct pxe_context *ctx, const char *file_path,
/* Allow up to 1GB */
*sizep = 1 << 30;
ret = bootmeth_read_file(info->dev, info->bflow, file_path, addr,
- sizep);
+ type, sizep);
if (ret)
return log_msg_ret("read", ret);
@@ -113,7 +114,7 @@ static int extlinux_pxe_read_bootflow(struct udevice *dev,
static int extlinux_pxe_read_file(struct udevice *dev, struct bootflow *bflow,
const char *file_path, ulong addr,
- ulong *sizep)
+ enum bootflow_img_t type, ulong *sizep)
{
char *tftp_argv[] = {"tftp", NULL, NULL, NULL};
struct pxe_context *ctx = dev_get_priv(dev);
@@ -134,6 +135,9 @@ static int extlinux_pxe_read_file(struct udevice *dev, struct bootflow *bflow,
return log_msg_ret("spc", -ENOSPC);
*sizep = size;
+ if (!bootflow_img_add(bflow, file_path, type, addr, size))
+ return log_msg_ret("pxi", -ENOMEM);
+
return 0;
}