aboutsummaryrefslogtreecommitdiff
path: root/src/hci
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2021-01-25 16:18:28 +0000
committerMichael Brown <mcb30@ipxe.org>2021-01-25 17:03:56 +0000
commit989a7a8032db02eb0524bd78a674d3b087dea3a6 (patch)
tree3ead7f99b466e3274d29dbeb0df7374905ff92d5 /src/hci
parentffc41ae9d12f319be67053e529091c8710303d3c (diff)
downloadipxe-989a7a8032db02eb0524bd78a674d3b087dea3a6.zip
ipxe-989a7a8032db02eb0524bd78a674d3b087dea3a6.tar.gz
ipxe-989a7a8032db02eb0524bd78a674d3b087dea3a6.tar.bz2
[image] Provide image_memory()
Consolidate the remaining logic common to initrd_init() and imgmem() into a shared image_memory() function. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/hci')
-rw-r--r--src/hci/commands/image_mem_cmd.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/hci/commands/image_mem_cmd.c b/src/hci/commands/image_mem_cmd.c
index 61d5053..c8bfab1 100644
--- a/src/hci/commands/image_mem_cmd.c
+++ b/src/hci/commands/image_mem_cmd.c
@@ -60,7 +60,6 @@ static struct command_descriptor imgmem_cmd =
*/
static int imgmem_exec ( int argc, char **argv ) {
struct imgmem_options opts;
- struct image *image;
unsigned int data;
unsigned int len;
int rc;
@@ -82,8 +81,7 @@ static int imgmem_exec ( int argc, char **argv ) {
return rc;
/* Create image */
- if ( ( rc = imgmem ( phys_to_user ( data ), len, opts.name,
- &image ) ) != 0 )
+ if ( ( rc = imgmem ( opts.name, phys_to_user ( data ), len ) ) != 0 )
return rc;
return 0;