Philippe Mathieu-Daudé <[email protected]> writes:
> On 13/2/22 03:14, Akihiko Odaki wrote:
>> Signed-off-by: Akihiko Odaki <[email protected]>
>> ---
>> 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 <[email protected]>
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 <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
> Is this menu updated when removable blkdev are hot-plugged from
> the monitor or QMP?
>
> Tested-by: Philippe Mathieu-Daudé <[email protected]>