diff options
author | Markus Armbruster <armbru@redhat.com> | 2014-10-24 12:19:11 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2014-10-24 12:19:11 +0100 |
commit | 7797a73947d5c0e63dd5552b348cf66c384b4555 (patch) | |
tree | 9e48798870378c8af03dfe2138682055768726a2 /vl.c | |
parent | 1430500bb8ba0bf15bad235439d62276c1b6b22f (diff) | |
download | hqemu-7797a73947d5c0e63dd5552b348cf66c384b4555.zip hqemu-7797a73947d5c0e63dd5552b348cf66c384b4555.tar.gz |
hmp: Remove "info pcmcia"
This command lists PCMCIA sockets and cards. Only a few ARM boards
have sockets (akita, borzoi, connex, mainstone, spitz, terrier, tosa,
verdex, z2), the only card is the DSCM-1xxxx Hitachi Microdrive (qdev
"microdrive"), and it is only inserted during machine init, if ever.
So this command doesn't really tell anybody anything new so far.
Moreover, pcmcia_socket_unregister() has a use-after-free bug, flagged
by Coverity. Has never been used, because there has never been code
to eject a PCMCIA card.
Not worth fixing & converting to QMP. Remove it.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Luiz Capitulino <lcapitulino@redhat.com>
Acked-by: Andreas Färber <afaerber@suse.de>
Message-id: 1411144812-22958-1-git-send-email-armbru@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 44 |
1 files changed, 0 insertions, 44 deletions
@@ -63,7 +63,6 @@ int main(int argc, char **argv) #include "hw/boards.h" #include "sysemu/accel.h" #include "hw/usb.h" -#include "hw/pcmcia.h" #include "hw/i386/pc.h" #include "hw/isa/isa.h" #include "hw/bt.h" @@ -1408,49 +1407,6 @@ void do_usb_del(Monitor *mon, const QDict *qdict) } /***********************************************************/ -/* PCMCIA/Cardbus */ - -static struct pcmcia_socket_entry_s { - PCMCIASocket *socket; - struct pcmcia_socket_entry_s *next; -} *pcmcia_sockets = 0; - -void pcmcia_socket_register(PCMCIASocket *socket) -{ - struct pcmcia_socket_entry_s *entry; - - entry = g_malloc(sizeof(struct pcmcia_socket_entry_s)); - entry->socket = socket; - entry->next = pcmcia_sockets; - pcmcia_sockets = entry; -} - -void pcmcia_socket_unregister(PCMCIASocket *socket) -{ - struct pcmcia_socket_entry_s *entry, **ptr; - - ptr = &pcmcia_sockets; - for (entry = *ptr; entry; ptr = &entry->next, entry = *ptr) - if (entry->socket == socket) { - *ptr = entry->next; - g_free(entry); - } -} - -void pcmcia_info(Monitor *mon, const QDict *qdict) -{ - struct pcmcia_socket_entry_s *iter; - - if (!pcmcia_sockets) - monitor_printf(mon, "No PCMCIA sockets\n"); - - for (iter = pcmcia_sockets; iter; iter = iter->next) - monitor_printf(mon, "%s: %s\n", iter->socket->slot_string, - iter->socket->attached ? iter->socket->card_string : - "Empty"); -} - -/***********************************************************/ /* machine registration */ MachineState *current_machine; |