qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH 5/5] monitor: add "info capabilities" command


From: Anthony Liguori
Subject: [Qemu-devel] Re: [PATCH 5/5] monitor: add "info capabilities" command
Date: Thu, 13 Nov 2008 13:50:56 -0600
User-agent: Thunderbird 2.0.0.17 (X11/20080925)

Mark McLoughlin wrote:
+static void do_info_capabilities(void)
+{
+    term_printf("[qemu]\n");
+    list_printf("accel", accel_names);
+    term_printf("arch=%s\n", TARGET_ARCH);
+    list_printf("cpu", cpu_names());
+    machines_printf();
+
+    term_printf("\n");
+
+    do_machine_capabilities();
+
+    term_printf("[devices]\n");
+    list_printf("bluetooth", bt_list_types());
+    list_printf("char", qemu_chr_list_types());
+    list_printf("drive_cache", drive_cache_types());
+    list_printf("drive_if", drive_if_types());
+    list_printf("graphics", graphics_list_types());
+    list_printf("network", net_client_types());
+#ifdef HAS_AUDIO
+    list_printf("soundhw", soundhw_list_types());
+#endif
+    list_printf("vga", vga_list_types());
+
+    term_printf("\n");

This makes me uneasy because it introduces a lot of dependencies that are going to be hard to break. I think this level of logic needs to be more encapsulated in the various subsystems.

+
+    term_printf("[limits]\n");
+    term_printf("max_boot_dev=q\n"); /* above '-boot q' not allowed */
+    term_printf("max_bluetooth_devs=%d\n", MAX_BT_CMDLINE);
+    term_printf("max_drives=%d\n", MAX_DRIVES);
+    term_printf("max_ide_devs=%d\n", MAX_IDE_DEVS);
+    term_printf("max_net_clients=%d\n", MAX_NET_CLIENTS);
+    term_printf("max_nics=%d\n", MAX_NICS);
+    term_printf("max_option_roms=%d\n", MAX_OPTION_ROMS);
+    term_printf("max_parallel_ports=%d\n", MAX_PARALLEL_PORTS);
+#ifdef TARGET_SPARC
+    term_printf("max_prom_envs=%d\n", MAX_PROM_ENVS);
+#endif
+    term_printf("max_scsi_devs=%d\n", MAX_SCSI_DEVS);
+    term_printf("max_serial_ports=%d\n", MAX_SERIAL_PORTS);
+    term_printf("max_usb_devs=%d\n", MAX_USB_CMDLINE);

While we have a lot of hard coded maximums today, I don't think we always will. How do you intend to support an unlimited number of things?

Regards,

Anthony Liguori





reply via email to

[Prev in Thread] Current Thread [Next in Thread]