diff options
author | Simon Rettberg | 2024-04-12 14:52:06 +0200 |
---|---|---|
committer | Simon Rettberg | 2024-04-12 14:52:06 +0200 |
commit | 2ae76865d3d109712f9ee488cbc19bd107bbc9ab (patch) | |
tree | 36e7310eb089cf7fd3496e5c32c70981e447f235 /src/core/image.c | |
parent | Merge branch 'aqc1xx' into openslx (diff) | |
parent | [netdevice] Add "linktype" setting (diff) | |
download | ipxe-2ae76865d3d109712f9ee488cbc19bd107bbc9ab.tar.gz ipxe-2ae76865d3d109712f9ee488cbc19bd107bbc9ab.tar.xz ipxe-2ae76865d3d109712f9ee488cbc19bd107bbc9ab.zip |
Merge branch 'master' into openslxopenslx
Diffstat (limited to 'src/core/image.c')
-rw-r--r-- | src/core/image.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/core/image.c b/src/core/image.c index 3e65b5ed..bf0e4f75 100644 --- a/src/core/image.c +++ b/src/core/image.c @@ -134,10 +134,13 @@ int image_set_uri ( struct image *image, struct uri *uri ) { int rc; /* Set name, if image does not already have one */ - if ( uri->path && ( ! ( image->name && image->name[0] ) ) ) { - name = basename ( ( char * ) uri->path ); - if ( ( rc = image_set_name ( image, name ) ) != 0 ) - return rc; + if ( ! ( image->name && image->name[0] ) ) { + name = ( uri->path ? uri->path : uri->opaque ); + if ( name ) { + name = basename ( ( char * ) name ); + if ( ( rc = image_set_name ( image, name ) ) != 0 ) + return rc; + } } /* Update image URI */ |