* [Qemu-devel] [BUG] qemu crashes if tun init fails
@ 2004-04-25 15:17 J. Mayer
0 siblings, 0 replies; only message in thread
From: J. Mayer @ 2004-04-25 15:17 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 85 bytes --]
Attached patch solves the problem.
--
J. Mayer <l_indien@magic.fr>
Never organized
[-- Attachment #2: Type: text/x-patch, Size: 597 bytes --]
Index: vl.c
===================================================================
RCS file: /cvsroot/qemu/qemu/vl.c,v
retrieving revision 1.61
diff -u -d -w -B -b -d -p -r1.61 vl.c
--- vl.c 22 Apr 2004 00:35:09 -0000 1.61
+++ vl.c 25 Apr 2004 15:10:33 -0000
@@ -913,6 +926,9 @@ static int net_tun_init(NetDriverState *
char *args[3];
char **parg;
+ /* Avoid crash if no tun device init fails */
+ nd->send_packet = dummy_send_packet;
+ nd->add_read_packet = dummy_add_read_packet;
nd->fd = tun_open(nd->ifname, sizeof(nd->ifname));
if (nd->fd < 0)
return -1;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-04-25 15:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-25 15:17 [Qemu-devel] [BUG] qemu crashes if tun init fails J. Mayer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).