1. 27 5月, 2015 2 次提交
    • M
      net: Permit incremental conversion of init functions to Error · a30ecde6
      Markus Armbruster 提交于
      Error reporting for netdev_add is broken: the net_client_init_fun[]
      report the actual errors with (at best) error_report(), and their
      caller net_client_init1() makes up a generic error on top.
      
      For command line and HMP, this produces an mildly ugly error cascade.
      
      In QMP, the actual errors go to stderr, and the generic error becomes
      the command's error reply.
      
      To fix this, we need to convert the net_client_init_fun[] to Error.
      
      To permit fixing them one by one, add an Error ** parameter to the
      net_client_init_fun[].  If the call fails without returning an Error,
      make up the same generic Error as before.  But if it returns one, use
      that instead.  Since none of them does so far, no functional change.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-id: 1431691143-1015-3-git-send-email-armbru@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      a30ecde6
    • M
      net: Improve error message for -net hubport a bit · ca7eb184
      Markus Armbruster 提交于
      Type "hubport" is valid only with -netdev.  Unfortunately, that's
      detected late and the error message doesn't explain why:
      
          $ qemu-system-i386 -net hubport,id=foo,hubid=0
          qemu-system-i386: -net hubport,id=foo,hubid=0: Device 'hubport' could not be initialized
      
      Improve the error message to "Parameter 'type' expects a net type".
      
      Not fixed: -net hubport without the parameters required by -netdev
      hubport still asks for those parameters:
      
          $ qemu-system-i386 -net hubport
          qemu-system-i386: -net hubport: Parameter 'hubid' is missing
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-id: 1431691143-1015-2-git-send-email-armbru@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      ca7eb184
  2. 11 5月, 2015 1 次提交
  3. 13 3月, 2015 1 次提交
  4. 10 3月, 2015 1 次提交
  5. 04 3月, 2015 1 次提交
  6. 26 2月, 2015 2 次提交
  7. 18 2月, 2015 4 次提交
    • M
      hmp: Name HMP info handler functions hmp_info_SUBCOMMAND() · 1ce6be24
      Markus Armbruster 提交于
      Some are called do_info_SUBCOMMAND() (old ones, usually), some
      hmp_info_SUBCOMMAND(), some SUBCOMMAND_info(), sometimes SUBCOMMAND
      pointlessly differs in spelling.
      
      Normalize to hmp_info_SUBCOMMAND(), where SUBCOMMAND is exactly the
      subcommand name with '-' replaced by '_'.
      
      Exceptions:
      
      * sun4m_irq_info(), sun4m_pic_info() renamed to sun4m_hmp_info_irq(),
        sun4m_hmp_info_pic().
      
      * lm32_irq_info(), lm32_pic_info() renamed to lm32_hmp_info_irq(),
        lm32_hmp_info_pic().
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      1ce6be24
    • M
      hmp: Name HMP command handler functions hmp_COMMAND() · 3e5a50d6
      Markus Armbruster 提交于
      Some are called do_COMMAND() (old ones, usually), some hmp_COMMAND(),
      and sometimes COMMAND pointlessly differs in spelling.
      
      Normalize to hmp_COMMAND(), where COMMAND is exactly the command name
      with '-' replaced by '_'.
      
      Exceptions:
      
      * do_device_add() and client_migrate_info() *not* renamed to
        hmp_device_add(), hmp_client_migrate_info(), because they're also
        QMP handlers.  They still need to be converted to QAPI.
      
      * do_memory_dump(), do_physical_memory_dump(), do_ioport_read(),
        do_ioport_write() renamed do hmp_* instead of hmp_x(), hmp_xp(),
        hmp_i(), hmp_o(), because those names are too cryptic for my taste.
      
      * do_info_help() renamed to hmp_info_help() instead of hmp_info(),
        because it only covers help.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      3e5a50d6
    • M
      net: Avoid qerror_report_err() outside QMP command handlers · 12d0cc2d
      Markus Armbruster 提交于
      qerror_report_err() is a transitional interface to help with
      converting existing monitor commands to QMP.  It should not be used
      elsewhere.  Replace by error_report_err() in HMP command handler
      hmp_host_net_add() and initial startup helpers net_init_client(),
      net_init_netdev().  Keep it in QMP command handler qmp_netdev_add().
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      12d0cc2d
    • M
      monitor: Clean up around monitor_handle_fd_param() · 1677f4c6
      Markus Armbruster 提交于
      monitor_handle_fd_param() is a wrapper around
      monitor_handle_fd_param2() that feeds errors to qerror_report_err()
      instead of returning them.  qerror_report_err() is inappropriate in
      many contexts.  monitor_handle_fd_param() looks simpler than
      monitor_handle_fd_param2(), which tempts use.  Remove the temptation:
      drop the wrapper and open-code the (trivial) error handling instead.
      
      Replace the open-coded qerror_report_err() by error_report_err() in
      places that already use error_report().  Turns out that's everywhere.
      
      While there, rename monitor_handle_fd_param2() to monitor_fd_param().
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      1677f4c6
  8. 06 2月, 2015 3 次提交
  9. 19 12月, 2014 3 次提交
  10. 21 11月, 2014 2 次提交
  11. 18 11月, 2014 1 次提交
  12. 17 11月, 2014 1 次提交
  13. 14 11月, 2014 1 次提交
  14. 11 11月, 2014 1 次提交
    • P
      slirp/smbd: modify/set several parameters in generated smbd.conf · 7912d04b
      Peter Wu 提交于
      The file sharing module should not handle printers, so disable it.
      The options 'load printers' and 'printing' have been available since the
      beginning (May 1996, commit 0e8fd3398771da2f016d72830179507f3edda51b).
      Option 'disable spoolss' is available since Samba 2.0.4, commit
      de5f42c9d9172592779fa2504d44544e3b6b1c0d).
      
      Next, "socket address" was reported as deprecated, use a combination of
      "interfaces" and "bind interfaces only" instead (available since October
      1997, commit 79f4fb52c1ed56fd843f81b4eb0cdd2991d4d0f4).
      
      Override cache directory to avoid writing to a global directory. Option
      available since Samba 3.4.0, Jan 2009, commit
      19a05bf2f485023b11b41dfae3f6459847d55ef7.
      
      Set "usershare max shared=0" to prevent a global directory from being
      used. Option available since Samba 3.0.23, February 2006, commit
      5831715049f2d460ce42299963a5defdc160891b.
      
      The last option was introduced with Samba 3.4.0, but previously
      "state directory" was already added which exists in Samba 3.4.0. As
      unknown parameters are ignored (while printing a warning), it should be
      safe to add another option.
      Signed-off-by: NPeter Wu <peter@lekensteyn.nl>
      Cc: Jan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      7912d04b
  15. 02 11月, 2014 4 次提交
  16. 05 9月, 2014 2 次提交
  17. 04 9月, 2014 1 次提交
    • Z
      net: Forbid dealing with packets when VM is not running · e1d64c08
      zhanghailiang 提交于
      For all NICs(except virtio-net) emulated by qemu,
      Such as e1000, rtl8139, pcnet and ne2k_pci,
      Qemu can still receive packets when VM is not running.
      
      If this happened in *migration's* last PAUSE VM stage, but
      before the end of the migration, the new receiving packets will possibly dirty
      parts of RAM which has been cached in *iovec*(will be sent asynchronously) and
      dirty parts of new RAM which will be missed.
      This will lead serious network fault in VM.
      
      To avoid this, we forbid receiving packets in generic net code when
      VM is not running.
      
      Bug reproduction steps:
      (1) Start a VM which configured at least one NIC
      (2) In VM, open several Terminal and do *Ping IP -i 0.1*
      (3) Migrate the VM repeatedly between two Hosts
      And the *PING* command in VM will very likely fail with message:
      'Destination HOST Unreachable', the NIC in VM will stay unavailable unless you
      run 'service network restart'
      Signed-off-by: Nzhanghailiang <zhang.zhanghailiang@huawei.com>
      Reviewed-by: NJason Wang <jasowang@redhat.com>
      Reviewed-by: NJuan Quintela <quintela@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      e1d64c08
  18. 03 9月, 2014 1 次提交
  19. 01 8月, 2014 1 次提交
  20. 18 7月, 2014 1 次提交
  21. 02 7月, 2014 1 次提交
  22. 27 6月, 2014 2 次提交
  23. 19 6月, 2014 3 次提交