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
 #include <stdlib.h>
22
 #include <stdlib.h>
23
 #include <stdio.h>
23
 #include <stdio.h>
24
 #include <errno.h>
24
 #include <errno.h>
25
-#include <libgen.h>
26
 #include <getopt.h>
25
 #include <getopt.h>
27
 #include <ipxe/image.h>
26
 #include <ipxe/image.h>
28
 #include <ipxe/command.h>
27
 #include <ipxe/command.h>
76
 
75
 
77
 	/* Parse URI string */
76
 	/* Parse URI string */
78
 	uri_string = argv[optind];
77
 	uri_string = argv[optind];
79
-	if ( ! opts.name )
80
-		opts.name = basename ( uri_string );
81
 
78
 
82
 	/* Parse command line */
79
 	/* Parse command line */
83
 	if ( argv[ optind + 1 ] != NULL ) {
80
 	if ( argv[ optind + 1 ] != NULL ) {

Loading…
Cancel
Save