summaryrefslogtreecommitdiff
path: root/common/cmd_pxe.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/cmd_pxe.c')
-rw-r--r--common/cmd_pxe.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c
index 77a7dd1..6b31dea 100644
--- a/common/cmd_pxe.c
+++ b/common/cmd_pxe.c
@@ -554,33 +554,19 @@ static void label_print(void *data)
*/
static int label_localboot(struct pxe_label *label)
{
- char *localcmd, *dupcmd;
- int ret;
+ char *localcmd;
localcmd = from_env("localcmd");
if (!localcmd)
return -ENOENT;
- /*
- * dup the command to avoid any issues with the version of it existing
- * in the environment changing during the execution of the command.
- */
- dupcmd = strdup(localcmd);
-
- if (!dupcmd)
- return -ENOMEM;
-
if (label->append)
setenv("bootargs", label->append);
- printf("running: %s\n", dupcmd);
-
- ret = run_command(dupcmd, 0);
+ debug("running: %s\n", localcmd);
- free(dupcmd);
-
- return ret;
+ return run_command_list(localcmd, strlen(localcmd), 0);
}
/*