ui/cocoa: Do not alert even without block devices
PATCH 1/1 ui/cocoa: Do not alert even without block devices
--- ui/cocoa.m | 5 ----- 1 file changed, 5 deletions(-)
ui/cocoa.m +0 -5
@@ -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];
Signature · 1 line
2.32.0 (Apple Git-132)
Quoted 11 lines · Akihiko Odaki
Signed-off-by Akihiko Odaki <[email protected]>--- ui/cocoa.m | 5 ----- 1 file changed, 5 deletions(-)ui/cocoa.m +0
-0@@ -1715,11 +1715,6 @@ static void addRemovableDevicesMenuItems(void)
ui/cocoa.m static void addRemovableDevicesMenuItems(void) · line 1720
Quoted 10 lines
ui/cocoa.m +0
-5currentDevice = 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.
Is this menu updated when removable blkdev are hot-plugged from the monitor or QMP?
Quoted 2 lines · Philippe Mathieu-Daudé
Is this menu updated when removable blkdev are hot-plugged from the monitor or QMP?
Actually no.
Markus Armbruster
Reviewed-by Peter MaydellQuoted 23 lines · Philippe Mathieu-Daudé
Quoted 9 lines · Akihiko Odaki
Signed-off-by Akihiko Odaki <[email protected]>--- ui/cocoa.m | 5 ----- 1 file changed, 5 deletions(-)ui/cocoa.m +0
-0ui/cocoa.m static void addRemovableDevicesMenuItems(void) · line 1719
Quoted 10 lines
ui/cocoa.m +0
-5@@ -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).
Quoted 2 lines
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.
Quoted 4 lines
Is this menu updated when removable blkdev are hot-plugged from the monitor or QMP?