diff options
author | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-07-17 20:47:13 +0000 |
---|---|---|
committer | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-07-17 20:47:13 +0000 |
commit | 6c9f886ceae5b998dc2b9af2bf77666941689bce (patch) | |
tree | 7f5c868d14c279b10390720b67ade84dcf0c6b2a /vl.c | |
parent | e6bf7d70b5a459f96f0b2cbc677926eebe685c84 (diff) |
Add CDC-Ethernet usb NIC (original patch from Thomas Sailer).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4884 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -5475,6 +5475,12 @@ static int usb_device_add(const char *devname) } else if (!strcmp(devname, "braille")) { dev = usb_baum_init(); #endif + } else if (strstart(devname, "net:", &p)) { + int nicidx = strtoul(p, NULL, 0); + + if (nicidx >= nb_nics || strcmp(nd_table[nicidx].model, "usb")) + return -1; + dev = usb_net_init(&nd_table[nicidx]); } else { return -1; } |