summaryrefslogtreecommitdiffstats
path: root/src/hci/commands/image_mem_cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hci/commands/image_mem_cmd.c')
-rw-r--r--src/hci/commands/image_mem_cmd.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/hci/commands/image_mem_cmd.c b/src/hci/commands/image_mem_cmd.c
index c8bfab1ad..60c0bf92a 100644
--- a/src/hci/commands/image_mem_cmd.c
+++ b/src/hci/commands/image_mem_cmd.c
@@ -24,6 +24,7 @@
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#include <getopt.h>
+#include <ipxe/uaccess.h>
#include <ipxe/command.h>
#include <ipxe/parseopt.h>
#include <usr/imgmgmt.h>
@@ -81,16 +82,11 @@ static int imgmem_exec ( int argc, char **argv ) {
return rc;
/* Create image */
- if ( ( rc = imgmem ( opts.name, phys_to_user ( data ), len ) ) != 0 )
+ if ( ( rc = imgmem ( opts.name, phys_to_virt ( data ), len ) ) != 0 )
return rc;
return 0;
}
/** Read memory command */
-struct command imgmem_commands[] __command = {
- {
- .name = "imgmem",
- .exec = imgmem_exec,
- },
-};
+COMMAND ( imgmem, imgmem_exec );