diff options
author | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-04-30 00:51:09 +0000 |
---|---|---|
committer | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-04-30 00:51:09 +0000 |
commit | 201a51fc386c0a2b55b13ad99589b1dfd1f39a5d (patch) | |
tree | 65d9796b41078e960398c50cc14e2d8e52042066 /vl.c | |
parent | 01179c382ba7bf8d5b063ca6afaa57c33f813287 (diff) | |
download | qemu-201a51fc386c0a2b55b13ad99589b1dfd1f39a5d.zip qemu-201a51fc386c0a2b55b13ad99589b1dfd1f39a5d.tar.gz qemu-201a51fc386c0a2b55b13ad99589b1dfd1f39a5d.tar.bz2 |
PCMCIA bus support. Parts of CF-ATA command set. Hitachi DSCM microdrive emulation.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2748 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 42 |
1 files changed, 42 insertions, 0 deletions
@@ -4412,6 +4412,48 @@ void usb_info(void) } /***********************************************************/ +/* PCMCIA/Cardbus */ + +static struct pcmcia_socket_entry_s { + struct pcmcia_socket_s *socket; + struct pcmcia_socket_entry_s *next; +} *pcmcia_sockets = 0; + +void pcmcia_socket_register(struct pcmcia_socket_s *socket) +{ + struct pcmcia_socket_entry_s *entry; + + entry = qemu_malloc(sizeof(struct pcmcia_socket_entry_s)); + entry->socket = socket; + entry->next = pcmcia_sockets; + pcmcia_sockets = entry; +} + +void pcmcia_socket_unregister(struct pcmcia_socket_s *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; + qemu_free(entry); + } +} + +void pcmcia_info(void) +{ + struct pcmcia_socket_entry_s *iter; + if (!pcmcia_sockets) + term_printf("No PCMCIA sockets\n"); + + for (iter = pcmcia_sockets; iter; iter = iter->next) + term_printf("%s: %s\n", iter->socket->slot_string, + iter->socket->attached ? iter->socket->card_string : + "Empty"); +} + +/***********************************************************/ /* dumb display */ static void dumb_update(DisplayState *ds, int x, int y, int w, int h) |