[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 4/6] fdc-test: Avoid deprecated 'change' comm
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH v2 4/6] fdc-test: Avoid deprecated 'change' command |
Date: |
Tue, 11 Apr 2017 10:58:33 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Am 11.04.2017 um 10:49 hat Markus Armbruster geschrieben:
> Eric Blake <address@hidden> writes:
>
> > On 01/19/2017 08:39 AM, Eric Blake wrote:
> >> On 01/19/2017 03:30 AM, Markus Armbruster wrote:
> >>> Eric Blake <address@hidden> writes:
> >>>
> >>>> Use the preferred blockdev-change-medium command instead.
> >>>>
> >>>> Signed-off-by: Eric Blake <address@hidden>
> >>>> Reviewed-by: John Snow <address@hidden>
> >>>> ---
> >>>> tests/fdc-test.c | 5 +++--
> >>>> 1 file changed, 3 insertions(+), 2 deletions(-)
> >>>>
> >>>> diff --git a/tests/fdc-test.c b/tests/fdc-test.c
> >>>> index 738c6b4..f5ff68d 100644
> >>>> --- a/tests/fdc-test.c
> >>>> +++ b/tests/fdc-test.c
> >>>> @@ -298,8 +298,9 @@ static void test_media_insert(void)
> >>>>
> >>>> /* Insert media in drive. DSKCHK should not be reset until a step
> >>>> pulse
> >>>> * is sent. */
> >>>> - qmp_discard_response("{'execute':'change', 'arguments':{"
> >>>> - " 'device':'floppy0', 'target': %s, 'arg':
> >>>> 'raw' }}",
> >>>> + qmp_discard_response("{'execute':'blockdev-change-medium',
> >>>> 'arguments':{"
> >>>> + " 'device':'floppy0', 'filename': %s, "
> >>>> + "'format': 'raw' }}",
> >>>> test_image);
> >>>>
> >>>> dir = inb(FLOPPY_BASE + reg_dir);
> >>>
> >>> 'device' is deprecated. Can we use 'id' here?
> >>
> >> I'll give it a shot.
> >
> > Harder than I thought. Search for 'floppy0' in tests/ - you'll notice
> > that nothing explicitly sets that device name, which means I don't know
> > where to inject an explicit 'id' counterpart name to use instead (we are
> > inheriting the default device name that you get when starting an x86
> > board without -nodefaults). Maybe someone else can supply an idea?
>
> Kevin, John?
I replied somewhere else, I guess v3 of the series. The solution is as
simple as '-device floppy,id=foo'.
Kevin