aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2007-01-09 19:44:41 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2007-01-09 19:44:41 +0000
commitbf8c534200b7e69e87725a0d49eb94c0da744f91 (patch)
tree134fa6fe969e92ddc122c3083467309d1ca5a92a /vl.c
parent01781963983206feac8c6be5ded68c3ee244c4ad (diff)
ifname arg fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2312 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/vl.c b/vl.c
index 3edca0ecfe..1ec78a7474 100644
--- a/vl.c
+++ b/vl.c
@@ -3886,7 +3886,9 @@ static int net_client_init(const char *str)
if (net_tap_fd_init(vlan, fd))
ret = 0;
} else {
- get_param_value(ifname, sizeof(ifname), "ifname", p);
+ if (get_param_value(ifname, sizeof(ifname), "ifname", p) <= 0) {
+ ifname[0] = '\0';
+ }
if (get_param_value(setup_script, sizeof(setup_script), "script", p) == 0) {
pstrcpy(setup_script, sizeof(setup_script), DEFAULT_NETWORK_SCRIPT);
}