Commit d927637dca36c564a2911dc4bc0d7969b654cd0c
1 parent
4f2ac237
init dummy net if tun/tap network error
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@763 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
3 additions
and
2 deletions
vl.c
@@ -1323,7 +1323,7 @@ int qemu_loadvm(const char *filename) | @@ -1323,7 +1323,7 @@ int qemu_loadvm(const char *filename) | ||
1323 | } | 1323 | } |
1324 | for(;;) { | 1324 | for(;;) { |
1325 | #if defined (DO_TB_FLUSH) | 1325 | #if defined (DO_TB_FLUSH) |
1326 | - tb_flush(); | 1326 | + tb_flush(global_env); |
1327 | #endif | 1327 | #endif |
1328 | len = qemu_get_byte(f); | 1328 | len = qemu_get_byte(f); |
1329 | if (feof(f)) | 1329 | if (feof(f)) |
@@ -2143,7 +2143,8 @@ int main(int argc, char **argv) | @@ -2143,7 +2143,8 @@ int main(int argc, char **argv) | ||
2143 | if (i < nb_tun_fds) { | 2143 | if (i < nb_tun_fds) { |
2144 | net_fd_init(nd, tun_fds[i]); | 2144 | net_fd_init(nd, tun_fds[i]); |
2145 | } else { | 2145 | } else { |
2146 | - net_tun_init(nd); | 2146 | + if (net_tun_init(nd) < 0) |
2147 | + net_dummy_init(nd); | ||
2147 | } | 2148 | } |
2148 | break; | 2149 | break; |
2149 | #endif | 2150 | #endif |