From: Markus Armbruster <armbru@redhat.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: Peter Maydell <peter.maydell@linaro.org>,
Gerd Hoffmann <kraxel@redhat.com>,
qemu-block@nongnu.org, Akihiko Odaki <akihiko.odaki@gmail.com>,
qemu-devel@nongnu.org
Subject: Re: [PATCH] ui/cocoa: Do not alert even without block devices
Date: Mon, 14 Feb 2022 14:32:53 +0100 [thread overview]
Message-ID: <8735klk1yy.fsf@pond.sub.org> (raw)
In-Reply-To: <2ba4330a-849a-3197-1c8d-3f1d655921b1@amsat.org> ("Philippe Mathieu-Daudé"'s message of "Mon, 14 Feb 2022 13:31:11 +0100")
Philippe Mathieu-Daudé <f4bug@amsat.org> writes:
> On 13/2/22 03:14, Akihiko Odaki wrote:
>> Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
>> ---
>> ui/cocoa.m | 5 -----
>> 1 file changed, 5 deletions(-)
>> diff --git a/ui/cocoa.m b/ui/cocoa.m
>> index ac18e14ce01..271a2676026 100644
>> --- a/ui/cocoa.m
>> +++ b/ui/cocoa.m
>> @@ -1715,11 +1715,6 @@ static void addRemovableDevicesMenuItems(void)
>> currentDevice = qmp_query_block(NULL);
>> pointerToFree = currentDevice;
>> - if(currentDevice == NULL) {
>> - NSBeep();
>> - QEMU_Alert(@"Failed to query for block devices!");
>> - return;
>> - }
>> menu = [[[NSApp mainMenu] itemWithTitle:@"Machine"]
>> submenu];
>>
>
> Cc'ing qemu-block@ and Markus (QMP).
>
> I always wondered the point of this annoying warning but never
> found out.
The condition conflates "query failed" (returns null with error and "no
block devices" (returns empty list, i.e. null, with no error set).
Quite suspicious.
Goes back to
Author: John Arbuckle <programmingkidx@gmail.com>
Date: Fri Jun 19 10:53:27 2015 +0100
ui/cocoa.m: Add machine menu items to change and eject removable drive media
Adds all removable devices to the Machine menu as a Change and Eject menu
item pair. ide-cd0 would have a "Change ide-cd0..." and "Eject ide-cd0"
menu items.
Signed-off-by: John Arbuckle <programmingkidx@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> Is this menu updated when removable blkdev are hot-plugged from
> the monitor or QMP?
>
> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
next prev parent reply other threads:[~2022-02-14 14:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-13 2:14 [PATCH] ui/cocoa: Do not alert even without block devices Akihiko Odaki
2022-02-14 12:31 ` Philippe Mathieu-Daudé via
2022-02-14 13:32 ` Markus Armbruster [this message]
2022-02-14 13:40 ` Akihiko Odaki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8735klk1yy.fsf@pond.sub.org \
--to=armbru@redhat.com \
--cc=akihiko.odaki@gmail.com \
--cc=f4bug@amsat.org \
--cc=kraxel@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.