Commit bf8c534200b7e69e87725a0d49eb94c0da744f91

Authored by bellard
1 parent 01781963

ifname arg fix


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2312 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 3 additions and 1 deletions
... ... @@ -3886,7 +3886,9 @@ static int net_client_init(const char *str)
3886 3886 if (net_tap_fd_init(vlan, fd))
3887 3887 ret = 0;
3888 3888 } else {
3889   - get_param_value(ifname, sizeof(ifname), "ifname", p);
  3889 + if (get_param_value(ifname, sizeof(ifname), "ifname", p) <= 0) {
  3890 + ifname[0] = '\0';
  3891 + }
3890 3892 if (get_param_value(setup_script, sizeof(setup_script), "script", p) == 0) {
3891 3893 pstrcpy(setup_script, sizeof(setup_script), DEFAULT_NETWORK_SCRIPT);
3892 3894 }
... ...