Browse Source

[image] Remove redundant call to basename()

There is no need to explicitly call basename() to construct an image
name in imgfetch_core_exec(), since image_set_uri() will do so
automatically anyway (and will do so without getting confused by URIs
with query strings).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 13 years ago
parent
commit
3c1bdfd5d9
1 changed files with 0 additions and 3 deletions
  1. 0
    3
      src/hci/commands/image_cmd.c

+ 0
- 3
src/hci/commands/image_cmd.c View File

@@ -22,7 +22,6 @@ FILE_LICENCE ( GPL2_OR_LATER );
22 22
 #include <stdlib.h>
23 23
 #include <stdio.h>
24 24
 #include <errno.h>
25
-#include <libgen.h>
26 25
 #include <getopt.h>
27 26
 #include <ipxe/image.h>
28 27
 #include <ipxe/command.h>
@@ -76,8 +75,6 @@ static int imgfetch_core_exec ( int argc, char **argv,
76 75
 
77 76
 	/* Parse URI string */
78 77
 	uri_string = argv[optind];
79
-	if ( ! opts.name )
80
-		opts.name = basename ( uri_string );
81 78
 
82 79
 	/* Parse command line */
83 80
 	if ( argv[ optind + 1 ] != NULL ) {

Loading…
Cancel
Save