Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Revert "hw/sparc64/niagara: Use blk_name() instead of open-coding it"
This reverts commit 1881f33.

This commit breaks "-drive if=pflash,readonly=on,file=image.iso".  It
claims to merely replace an open-coded version of blk_name() by a
call, but that's not the case.  Sorry for the inconvenience!

Reported-by: Jakub Jermář <jakub@jermar.eu>
Cc: qemu-stable@nongnu.org
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20230515151104.1350155-1-armbru@redhat.com>
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
(cherry picked from commit ac5e8c1)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
  • Loading branch information
Markus Armbruster authored and Michael Tokarev committed Jun 28, 2023
1 parent 8c792a5 commit a76c512
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions hw/sparc64/niagara.c
Expand Up @@ -23,6 +23,7 @@
*/

#include "qemu/osdep.h"
#include "block/block_int-common.h"
#include "qemu/units.h"
#include "cpu.h"
#include "hw/boards.h"
Expand Down Expand Up @@ -143,9 +144,10 @@ static void niagara_init(MachineState *machine)
memory_region_add_subregion(get_system_memory(),
NIAGARA_VDISK_BASE, &s->vdisk_ram);
dinfo->is_default = 1;
rom_add_file_fixed(blk_name(blk), NIAGARA_VDISK_BASE, -1);
rom_add_file_fixed(blk_bs(blk)->filename, NIAGARA_VDISK_BASE, -1);
} else {
error_report("could not load ram disk '%s'", blk_name(blk));
error_report("could not load ram disk '%s'",
blk_bs(blk)->filename);
exit(1);
}
}
Expand Down

0 comments on commit a76c512

Please sign in to comment.