Commit 158156d13df1828b9ee7def9c14688285900c2dc

Authored by bellard
1 parent e63c59cb

-user-net is optional - EAGAIN fix


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@817 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 3 additions and 1 deletions
... ... @@ -1820,7 +1820,7 @@ int main_loop(void)
1820 1820 n = read(ioh->fd, buf, ioh->max_size);
1821 1821 if (n >= 0) {
1822 1822 ioh->fd_read(ioh->opaque, buf, n);
1823   - } else if (errno != -EAGAIN) {
  1823 + } else if (errno != EAGAIN) {
1824 1824 ioh->fd_read(ioh->opaque, NULL, -errno);
1825 1825 }
1826 1826 }
... ... @@ -2001,7 +2001,9 @@ const QEMUOption qemu_options[] = {
2001 2001 { "macaddr", HAS_ARG, QEMU_OPTION_macaddr},
2002 2002 { "n", HAS_ARG, QEMU_OPTION_d },
2003 2003 { "tun-fd", HAS_ARG, QEMU_OPTION_tun_fd },
  2004 +#ifdef CONFIG_SLIRP
2004 2005 { "user-net", 0, QEMU_OPTION_user_net },
  2006 +#endif
2005 2007 { "dummy-net", 0, QEMU_OPTION_dummy_net },
2006 2008  
2007 2009 { "kernel", HAS_ARG, QEMU_OPTION_kernel },
... ...