* [PATCH] Revert "hw/sparc64/niagara: Use blk_name() instead of open-coding it"
@ 2023-05-15 15:11 Markus Armbruster
2023-05-16 7:00 ` Mark Cave-Ayland
2023-06-27 6:48 ` Mark Cave-Ayland
0 siblings, 2 replies; 5+ messages in thread
From: Markus Armbruster @ 2023-05-15 15:11 UTC (permalink / raw)
To: qemu-devel
Cc: atar4qemu, mark.cave-ayland, Jakub Jermář, qemu-stable
This reverts commit 1881f336a33a8a99cb17ab1c57ed953682e8e107.
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>
---
hw/sparc64/niagara.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/sparc64/niagara.c b/hw/sparc64/niagara.c
index 6725cc61fd..ab3c4ec346 100644
--- a/hw/sparc64/niagara.c
+++ b/hw/sparc64/niagara.c
@@ -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"
@@ -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);
}
}
--
2.39.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] Revert "hw/sparc64/niagara: Use blk_name() instead of open-coding it"
2023-05-15 15:11 [PATCH] Revert "hw/sparc64/niagara: Use blk_name() instead of open-coding it" Markus Armbruster
@ 2023-05-16 7:00 ` Mark Cave-Ayland
2023-05-16 8:04 ` Markus Armbruster
2023-06-27 6:48 ` Mark Cave-Ayland
1 sibling, 1 reply; 5+ messages in thread
From: Mark Cave-Ayland @ 2023-05-16 7:00 UTC (permalink / raw)
To: Markus Armbruster, qemu-devel
Cc: atar4qemu, Jakub Jermář, qemu-stable
On 15/05/2023 16:11, Markus Armbruster wrote:
> This reverts commit 1881f336a33a8a99cb17ab1c57ed953682e8e107.
>
> 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!
Ah so was this a case of replacing something that shouldn't have been replaced in the
first place, or does it require a follow-up patch?
> Reported-by: Jakub Jermář <jakub@jermar.eu>
> Cc: qemu-stable@nongnu.org
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
> hw/sparc64/niagara.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/hw/sparc64/niagara.c b/hw/sparc64/niagara.c
> index 6725cc61fd..ab3c4ec346 100644
> --- a/hw/sparc64/niagara.c
> +++ b/hw/sparc64/niagara.c
> @@ -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"
> @@ -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);
> }
> }
Regardless of the above:
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
ATB,
Mark.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Revert "hw/sparc64/niagara: Use blk_name() instead of open-coding it"
2023-05-16 7:00 ` Mark Cave-Ayland
@ 2023-05-16 8:04 ` Markus Armbruster
2023-05-16 15:08 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 5+ messages in thread
From: Markus Armbruster @ 2023-05-16 8:04 UTC (permalink / raw)
To: Mark Cave-Ayland
Cc: qemu-devel, atar4qemu, Jakub Jermář, qemu-stable
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> writes:
> On 15/05/2023 16:11, Markus Armbruster wrote:
>
>> This reverts commit 1881f336a33a8a99cb17ab1c57ed953682e8e107.
>> 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!
>
> Ah so was this a case of replacing something that shouldn't have been replaced in the first place, or does it require a follow-up patch?
I was looking at inclusions of block/block_int*.h outside the block
subsystem, and went "Oh, I can get rid of this one!" Nope, brain
malfunction.
Reducing such inclusions is always nice, but the code this patch
restores isn't broken, and no follow-up fix is required.
>> Reported-by: Jakub Jermář <jakub@jermar.eu>
>> Cc: qemu-stable@nongnu.org
>> Signed-off-by: Markus Armbruster <armbru@redhat.com>
[...]
> Regardless of the above:
>
> Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Thanks!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Revert "hw/sparc64/niagara: Use blk_name() instead of open-coding it"
2023-05-16 8:04 ` Markus Armbruster
@ 2023-05-16 15:08 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-05-16 15:08 UTC (permalink / raw)
To: Markus Armbruster, Mark Cave-Ayland
Cc: qemu-devel, atar4qemu, Jakub Jermář, qemu-stable
On 16/5/23 10:04, Markus Armbruster wrote:
> Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> writes:
>
>> On 15/05/2023 16:11, Markus Armbruster wrote:
>>
>>> This reverts commit 1881f336a33a8a99cb17ab1c57ed953682e8e107.
>>> 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!
>>
>> Ah so was this a case of replacing something that shouldn't have been replaced in the first place, or does it require a follow-up patch?
>
> I was looking at inclusions of block/block_int*.h outside the block
> subsystem, and went "Oh, I can get rid of this one!" Nope, brain
> malfunction.
x2, sorry :/
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Reducing such inclusions is always nice, but the code this patch
> restores isn't broken, and no follow-up fix is required.
>
>>> Reported-by: Jakub Jermář <jakub@jermar.eu>
>>> Cc: qemu-stable@nongnu.org
>>> Signed-off-by: Markus Armbruster <armbru@redhat.com>
>
> [...]
>
>> Regardless of the above:
>>
>> Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
>
> Thanks!
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Revert "hw/sparc64/niagara: Use blk_name() instead of open-coding it"
2023-05-15 15:11 [PATCH] Revert "hw/sparc64/niagara: Use blk_name() instead of open-coding it" Markus Armbruster
2023-05-16 7:00 ` Mark Cave-Ayland
@ 2023-06-27 6:48 ` Mark Cave-Ayland
1 sibling, 0 replies; 5+ messages in thread
From: Mark Cave-Ayland @ 2023-06-27 6:48 UTC (permalink / raw)
To: Markus Armbruster, qemu-devel
Cc: atar4qemu, Jakub Jermář, qemu-stable
On 15/05/2023 16:11, Markus Armbruster wrote:
> This reverts commit 1881f336a33a8a99cb17ab1c57ed953682e8e107.
>
> 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>
> ---
> hw/sparc64/niagara.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/hw/sparc64/niagara.c b/hw/sparc64/niagara.c
> index 6725cc61fd..ab3c4ec346 100644
> --- a/hw/sparc64/niagara.c
> +++ b/hw/sparc64/niagara.c
> @@ -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"
> @@ -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);
> }
> }
Thanks - I've queued this to my qemu-sparc branch.
ATB,
Mark.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-06-27 6:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-15 15:11 [PATCH] Revert "hw/sparc64/niagara: Use blk_name() instead of open-coding it" Markus Armbruster
2023-05-16 7:00 ` Mark Cave-Ayland
2023-05-16 8:04 ` Markus Armbruster
2023-05-16 15:08 ` Philippe Mathieu-Daudé
2023-06-27 6:48 ` Mark Cave-Ayland
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).