Signed-off-by: Mao Zhongyi
---
hw/isa/pc87312.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/isa/pc87312.c b/hw/isa/pc87312.c
index 85dbc94439..e95176c148 100644
--- a/hw/isa/pc87312.c
+++ b/hw/isa/pc87312.c
@@ -336,8 +336,8 @@ static void pc87312_class_init
il.com
Cc: jc...@redhat.com
Cc: kw...@redhat.com
Cc: mre...@redhat.com
Cc: berra...@redhat.com
Cc: kra...@redhat.com
Cc: pbonz...@redhat.com
Cc: qemu-bl...@nongnu.org
Cc: sheep...@lists.wpkg.org
Suggested-by: Daniel P. Berrange
Signed-off-by: Cao jin
Signed-off-by: Mao Zhongyi
---
This patch was
On 06/15/2017 03:34 PM, Juan Quintela wrote:
Mao Zhongyi wrote:
From: Cao jin
The non-blocking connect mechanism is obsolete, and it doesn't
work well in inet connection, because it will call getaddrinfo
first and getaddrinfo will blocks on DNS lookups. Since commit
e65c67e4 &
On 06/16/2017 08:21 AM, Fam Zheng wrote:
On Thu, 06/15 11:08, Mao Zhongyi wrote:
From: Cao jin
The non-blocking connect mechanism is obsolete, and it doesn't
work well in inet connection, because it will call getaddrinfo
first and getaddrinfo will blocks on DNS lookups. Since c
ed-off-by: Mao Zhongyi
Reviewed-by: Juan Quintela
Reviewed-by: Daniel P. Berrange
---
v2:
1. block/ssh.c is not compiled in v1 which leads to no error
reported when I run make & make check, although I make a
mistake in block/ssh.c, because the package libssh2-devel
: Cao jin
Signed-off-by: Mao Zhongyi
Reviewed-by: Juan Quintela
Reviewed-by: Daniel P. Berrange
---
v3:
1. fix the mistake that adds a unmodified file '--help' [Fam Zheng]
v2:
1. block/ssh.c is not compiled in v1 which leads to no error
reported when I run make & make c
Hi, Marcel
On 06/19/2017 07:42 PM, Marcel Apfelbaum wrote:
On 12/06/2017 16:48, Mao Zhongyi wrote:
The pci-birdge device i82801b11
It is a dmi-to-pci brigde
and io3130_upstream/downstream
You forgot to mention the pcie_root_port.
still implements the old PCIDeviceClass .init() through
Hi, Marcel
On 06/19/2017 08:05 PM, Marcel Apfelbaum wrote:
On 12/06/2017 16:48, Mao Zhongyi wrote:
In order to propagate error message better, convert shpc_init() to
Error also convert the pci_bridge_dev_initfn() to realize.
Cc: m...@redhat.com
Cc: mar...@redhat.com
Cc: arm...@redhat.com
: Mao Zhongyi
Reviewed-by: Marcel Apfelbaum
---
hw/pci/pci.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 98ccc27..53566b8 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -2270,12 +2270,8 @@ int pci_add_capability(PCIDevice *pdev, uint8_t
Suggested-by: Eduardo Habkost
Signed-off-by: Mao Zhongyi
Reviewed-by: Marcel Apfelbaum
---
hw/i386/kvm/pci-assign.c | 14 +++---
hw/ide/ich.c | 2 +-
hw/pci/msi.c | 2 +-
hw/pci/msix.c| 2 +-
hw/pci/pci.c | 20 ++--
hw/
In order to propagate error message better, convert shpc_init() to
Error also convert the pci_bridge_dev_initfn() to realize.
Cc: m...@redhat.com
Cc: mar...@redhat.com
Cc: arm...@redhat.com
Signed-off-by: Mao Zhongyi
---
hw/pci-bridge/pci_bridge_dev.c | 21 -
hw/pci/shpc.c
Comments for pci_add_capability2() to explain the return
value. This may help to make a correct return value check
for its callers.
Cc: m...@redhat.com
Cc: mar...@redhat.com
Cc: arm...@redhat.com
Suggested-by: Markus Armbruster
Signed-off-by: Mao Zhongyi
Reviewed-by: Marcel Apfelbaum
---
hw
pci_add_capability returns a strictly positive value on success,
correct asserts.
Cc: dmi...@daynix.com
Cc: jasow...@redhat.com
Cc: kra...@redhat.com
Cc: alex.william...@redhat.com
Cc: arm...@redhat.com
Cc: mar...@redhat.com
Signed-off-by: Mao Zhongyi
---
hw/net/e1000e.c | 2 +-
hw/net
.@redhat.com
Cc: kra...@redhat.com
Cc: alex.william...@redhat.com
Cc: pbonz...@redhat.com
Cc: r...@twiddle.net
Cc: ehabk...@redhat.com
Mao Zhongyi (9):
pci: Clean up error checking in pci_add_capability()
pci: Add comment for pci_add_capability2()
pci: Fix the wrong assertion.
pci: Make errp t
value is worth. So fix the return type to avoid
it.
Cc: pbonz...@redhat.com
Cc: r...@twiddle.net
Cc: ehabk...@redhat.com
Cc: m...@redhat.com
Cc: arm...@redhat.com
Cc: mar...@redhat.com
Signed-off-by: Mao Zhongyi
---
hw/i386/kvm/pci-assign.c | 18 ++
1 file changed, 6 insertions
...@redhat.com
Cc: r...@twiddle.net
Cc: ehabk...@redhat.com
Cc: m...@redhat.com
Cc: arm...@redhat.com
Cc: mar...@redhat.com
Signed-off-by: Mao Zhongyi
---
hw/i386/kvm/pci-assign.c | 22 +++---
1 file changed, 7 insertions(+), 15 deletions(-)
diff --git a/hw/i386/kvm/pci-assign.c b/hw/i386/kvm
redhat.com
Cc: mar...@redhat.com
Cc: alex.william...@redhat.com
Cc: arm...@redhat.com
Signed-off-by: Mao Zhongyi
Reviewed-by: Marcel Apfelbaum
---
hw/i386/amd_iommu.c | 24 +---
hw/net/e1000e.c | 30 ++
hw/net/eepro100.c
Convert i82801b11, io3130_upstream, io3130_downstream and
pcie_root_port devices to realize.
Cc: m...@redhat.com
Cc: mar...@redhat.com
Cc: arm...@redhat.com
Signed-off-by: Mao Zhongyi
---
hw/pci-bridge/i82801b11.c | 11 +--
hw/pci-bridge/pcie_root_port.c | 18
On 06/21/2017 03:39 PM, Marcel Apfelbaum wrote:
On 20/06/2017 6:51, Mao Zhongyi wrote:
Hi, Marcel
On 06/19/2017 08:05 PM, Marcel Apfelbaum wrote:
On 12/06/2017 16:48, Mao Zhongyi wrote:
In order to propagate error message better, convert shpc_init() to
Error also convert the
On 06/22/2017 02:29 PM, Marcel Apfelbaum wrote:
On 22/06/2017 6:47, Mao Zhongyi wrote:
On 06/21/2017 03:39 PM, Marcel Apfelbaum wrote:
On 20/06/2017 6:51, Mao Zhongyi wrote:
Hi, Marcel
On 06/19/2017 08:05 PM, Marcel Apfelbaum wrote:
On 12/06/2017 16:48, Mao Zhongyi wrote:
In order to
In order to propagate error message better, convert shpc_init() to
Error also convert the pci_bridge_dev_initfn() to realize.
Cc: m...@redhat.com
Cc: mar...@redhat.com
Cc: arm...@redhat.com
Signed-off-by: Mao Zhongyi
---
v7:
* drop the !local_err assert is really not appropriate,
now revert it
On 06/23/2017 05:56 PM, Marcel Apfelbaum wrote:
On 22/06/2017 11:14, Mao Zhongyi wrote:
In order to propagate error message better, convert shpc_init() to
Error also convert the pci_bridge_dev_initfn() to realize.
Cc: m...@redhat.com
Cc: mar...@redhat.com
Cc: arm...@redhat.com
Signed-off-by
Hi, Markus
On 06/23/2017 09:36 PM, Markus Armbruster wrote:
Mao Zhongyi writes:
In the net_socket_fd_init(), the 'default' case and comment is odd.
If @fd really was a pty, getsockopt() would fail with ENOTSOCK. If
@fd was a socket, but neither SOCK_DGRAM nor SOCK_STREAM. It sho
Hi, Markus
On 06/23/2017 10:21 PM, Markus Armbruster wrote:
Markus Armbruster writes:
Mao Zhongyi writes:
Cc: berra...@redhat.com
Cc: kra...@redhat.com
Cc: pbonz...@redhat.com
Cc: jasow...@redhat.com
Cc: arm...@redhat.com
Signed-off-by: Mao Zhongyi
---
include/qemu/sockets.h | 2
redhat.com
Suggested-by: Markus Armbruster
Suggested-by: Daniel P. Berrange
Signed-off-by: Mao Zhongyi
Reviewed-by: Markus Armbruster
---
net/socket.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/socket.c b/net/socket.c
index dcae1ae..53765bd 100644
--- a/ne
to Error.
* PATCH 04 parse_host_port() may fail without reporting an error. Now, fix it
to set an
error when it fails.
Cc: jasow...@redhat.com
Cc: arm...@redhat.com
Cc: berra...@redhat.com
Cc: kra...@redhat.com
Cc: pbonz...@redhat.com
Mao Zhongyi (4):
net/socket: Don
Cc: berra...@redhat.com
Cc: kra...@redhat.com
Cc: pbonz...@redhat.com
Cc: jasow...@redhat.com
Cc: arm...@redhat.com
Signed-off-by: Mao Zhongyi
---
include/qemu/sockets.h | 3 ++-
net/net.c | 22 +-
net/socket.c | 19 ++-
3 files changed
t the same time, add many explicit error handling message when it fails.
Cc: jasow...@redhat.com
Cc: arm...@redhat.com
Signed-off-by: Mao Zhongyi
---
net/socket.c | 95 ++--
1 file changed, 47 insertions(+), 48 deletions(-)
diff --git a/net/
Currently, net_socket_mcast_create(), net_socket_fd_init_dgram() and
net_socket_fd_init() use the function such as fprintf(), perror() to
report an error message.
Now, convert these functions to Error.
Cc: jasow...@redhat.com
Cc: arm...@redhat.com
Signed-off-by: Mao Zhongyi
---
net/socket.c
n value check
Cc: m...@redhat.com
Cc: mar...@redhat.com
Cc: arm...@redhat.com
Cc: dmi...@daynix.com
Cc: jasow...@redhat.com
Cc: kra...@redhat.com
Cc: alex.william...@redhat.com
Cc: pbonz...@redhat.com
Cc: r...@twiddle.net
Cc: ehabk...@redhat.com
Mao Zhongyi (9):
pci: Clean up error checking in pci_ad
redhat.com
Cc: mar...@redhat.com
Cc: alex.william...@redhat.com
Cc: arm...@redhat.com
Signed-off-by: Mao Zhongyi
Reviewed-by: Marcel Apfelbaum
---
hw/i386/amd_iommu.c | 24 +---
hw/net/e1000e.c | 30 ++
hw/net/eepro100.c
: Mao Zhongyi
Reviewed-by: Marcel Apfelbaum
---
hw/pci/pci.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 98ccc27..53566b8 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -2270,12 +2270,8 @@ int pci_add_capability(PCIDevice *pdev, uint8_t
In order to propagate error message better, convert shpc_init() to
Error also convert the pci_bridge_dev_initfn() to realize.
Cc: m...@redhat.com
Cc: mar...@redhat.com
Cc: arm...@redhat.com
Signed-off-by: Mao Zhongyi
Reviewed-by: Marcel Apfelbaum
---
hw/pci-bridge/pci_bridge_dev.c | 14
value is worth. So fix the return type to avoid
it.
Cc: pbonz...@redhat.com
Cc: r...@twiddle.net
Cc: ehabk...@redhat.com
Cc: m...@redhat.com
Cc: arm...@redhat.com
Cc: mar...@redhat.com
Signed-off-by: Mao Zhongyi
Reviewed-by: Marcel Apfelbaum
---
hw/i386/kvm/pci-assign.c | 18
pci_add_capability returns a strictly positive value on success,
correct asserts.
Cc: dmi...@daynix.com
Cc: jasow...@redhat.com
Cc: kra...@redhat.com
Cc: alex.william...@redhat.com
Cc: arm...@redhat.com
Cc: mar...@redhat.com
Signed-off-by: Mao Zhongyi
Reviewed-by: Marcel Apfelbaum
---
hw/net
Convert i82801b11, io3130_upstream, io3130_downstream and
pcie_root_port devices to realize.
Cc: m...@redhat.com
Cc: mar...@redhat.com
Cc: arm...@redhat.com
Signed-off-by: Mao Zhongyi
Reviewed-by: Marcel Apfelbaum
---
hw/pci-bridge/i82801b11.c | 11 +--
hw/pci-bridge
Cc: pbonz...@redhat.com
Cc: r...@twiddle.net
Cc: ehabk...@redhat.com
Cc: m...@redhat.com
Cc: dmi...@daynix.com
Cc: jasow...@redhat.com
Cc: mar...@redhat.com
Cc: alex.william...@redhat.com
Cc: arm...@redhat.com
Suggested-by: Eduardo Habkost
Signed-off-by: Mao Zhongyi
Reviewed-by: Marcel Apfelbau
...@redhat.com
Cc: r...@twiddle.net
Cc: ehabk...@redhat.com
Cc: m...@redhat.com
Cc: arm...@redhat.com
Cc: mar...@redhat.com
Signed-off-by: Mao Zhongyi
Reviewed-by: Marcel Apfelbaum
---
hw/i386/kvm/pci-assign.c | 22 +++---
1 file changed, 7 insertions(+), 15 deletions(-)
diff --git a/hw/i386
Comments for pci_add_capability2() to explain the return
value. This may help to make a correct return value check
for its callers.
Cc: m...@redhat.com
Cc: mar...@redhat.com
Cc: arm...@redhat.com
Signed-off-by: Mao Zhongyi
Reviewed-by: Marcel Apfelbaum
---
hw/pci/pci.c | 6 ++
1 file
Hi, Markus
On 06/27/2017 03:43 PM, Markus Armbruster wrote:
Suggest "net/socket: Convert several helper functions to Error".
OK, I see.
Mao Zhongyi writes:
Currently, net_socket_mcast_create(), net_socket_fd_init_dgram() and
net_socket_fd_init() use the function such
Hi, Markus
On 06/27/2017 04:04 PM, Markus Armbruster wrote:
Mao Zhongyi writes:
Cc: berra...@redhat.com
Cc: kra...@redhat.com
Cc: pbonz...@redhat.com
Cc: jasow...@redhat.com
Cc: arm...@redhat.com
Signed-off-by: Mao Zhongyi
---
include/qemu/sockets.h | 3 ++-
net/net.c | 22
The non-blocking connect mechanism doesn't work well in
net connection, it still blocks on DNS lookups. So it is
obsolete. Supersede it with QIOchannel.
Signed-off-by: Mao Zhongyi
---
The test steps like this:
$ qemu-system-x86_64 -net nic -net socket,listen=:1234 ~/img/tes
uld not be initialized
Convert net_init_socket() to Error to get rid of the unwanted second
error message.
Signed-off-by: Mao Zhongyi
---
net/socket.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/net/socket.c b/net/socket.c
index 1886f98..85ad9cd 100644
--- a/ne
to pass
error for its callers.
* patch6: convert part of pci-bridge device to realize.
v1:
* patch1: fix unreasonable return value check
Mao Zhongyi (6):
pci: Clean up error checking in pci_add_capability()
pci: Add comment for pci_add_capability2()
pci: Fix the wrong return value
...@redhat.com
Signed-off-by: Mao Zhongyi
Reviewed-by: Marcel Apfelbaum
---
hw/pci/pci.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 98ccc27..53566b8 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -2270,12 +2270,8 @@ int pci_add_capability
Add a comment for pci_add_capability2() to explain the return
value. This may help to make a correct return value check for
its callers.
Cc: m...@redhat.com
Cc: mar...@redhat.com
Cc: arm...@redhat.com
Suggested-by: Markus Armbruster
Signed-off-by: Mao Zhongyi
---
hw/pci/pci.c | 4
1 file
: arm...@redhat.com
Signed-off-by: Mao Zhongyi
---
hw/pci-bridge/i82801b11.c | 11 +--
hw/pci-bridge/pcie_root_port.c | 15 ++-
hw/pci-bridge/xio3130_downstream.c | 20 +---
hw/pci-bridge/xio3130_upstream.c | 20 +---
hw/pci
m its callers.
Cc: dmi...@daynix.com
Cc: jasow...@redhat.com
Cc: alex.william...@redhat.com
Cc: mar...@redhat.com
Cc: m...@redhat.com
Cc: arm...@redhat.com
Signed-off-by: Mao Zhongyi
---
hw/net/e1000e.c | 2 +-
hw/net/eepro100.c | 2 +-
hw/vfio/pci.c | 2 +-
3 files changed, 3 insertions(
It reports a code style problem(ERROR: "foo * bar" should be "foo *bar")
when running checkpatch.pl. So fix it to conform to the coding standards.
Cc: jasow...@redhat.com
Cc: arm...@redhat.com
Signed-off-by: Mao Zhongyi
---
hw
nix.com
Cc: jasow...@redhat.com
Cc: mar...@redhat.com
Cc: alex.william...@redhat.com
Cc: arm...@redhat.com
Signed-off-by: Mao Zhongyi
---
hw/i386/amd_iommu.c | 24 +---
hw/net/e1000e.c | 7 ++-
hw/net/eepro100.c | 17 -
hw/pci-bridge
Hi, Eduardo
On 06/03/2017 01:45 AM, Eduardo Habkost wrote:
On Fri, Jun 02, 2017 at 03:54:41PM +0800, Mao Zhongyi wrote:
Add Error argument for pci_add_capability() to leverage the errp
to pass info on errors. This way is helpful for its callers to
make a better error handling when moving to
Hi, Marcel
On 06/06/2017 12:20 AM, Marcel Apfelbaum wrote:
On 02/06/2017 10:54, Mao Zhongyi wrote:
On success, pci_add_capability2() returns a positive value. On
failure, it sets an error and return a negative value. It doesn't
always return 0. So the judgment condtion of pci_add_capabi
Hi, Marcel
On 06/05/2017 09:34 PM, Marcel Apfelbaum wrote:
On 02/06/2017 10:54, Mao Zhongyi wrote:
Add a comment for pci_add_capability2() to explain the return
value. This may help to make a correct return value check for
its callers.
Cc: m...@redhat.com
Cc: mar...@redhat.com
Cc: arm
nix.com
Cc: jasow...@redhat.com
Cc: mar...@redhat.com
Cc: alex.william...@redhat.com
Cc: arm...@redhat.com
Signed-off-by: Mao Zhongyi
---
hw/i386/amd_iommu.c | 24 +---
hw/net/e1000e.c | 7 ++-
hw/net/eepro100.c | 20 +++-
hw/
: arm...@redhat.com
Signed-off-by: Mao Zhongyi
---
hw/pci-bridge/i82801b11.c | 11 +--
hw/pci-bridge/pcie_root_port.c | 15 ++-
hw/pci-bridge/xio3130_downstream.c | 20 +---
hw/pci-bridge/xio3130_upstream.c | 20 +---
hw/pci
: Mao Zhongyi
Reviewed-by: Marcel Apfelbaum
---
hw/pci/pci.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 98ccc27..53566b8 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -2270,12 +2270,8 @@ int pci_add_capability(PCIDevice *pdev, uint8_t
Comments for pci_add_capability2() to explain the return
value. This may help to make a correct return value check
for its callers.
Cc: m...@redhat.com
Cc: mar...@redhat.com
Cc: arm...@redhat.com
Suggested-by: Markus Armbruster
Signed-off-by: Mao Zhongyi
---
hw/pci/pci.c | 6 ++
1 file
pci_add_capability returns a strictly positive value on success,
correct asserts.
Cc: dmi...@daynix.com
Cc: jasow...@redhat.com
Cc: kra...@redhat.com
Cc: alex.william...@redhat.com
Cc: arm...@redhat.com
Signed-off-by: Mao Zhongyi
---
hw/net/e1000e.c | 2 +-
hw/net/eepro100.c | 2 +-
hw/usb
It reports a code style problem(ERROR: "foo * bar" should be "foo *bar")
when running checkpatch.pl. So fix it to conform to the coding standards.
Cc: jasow...@redhat.com
Cc: arm...@redhat.com
Signed-off-by: Mao Zhongyi
---
hw
In order to propagate error message better, convert shpc_init() to
Error also convert the pci_bridge_dev_initfn() to realize.
Cc: m...@redhat.com
Cc: mar...@redhat.com
Cc: arm...@redhat.com
Signed-off-by: Mao Zhongyi
---
hw/pci-bridge/pci_bridge_dev.c | 21 -
hw/pci/shpc.c
pass
error for its callers.
* patch6: convert part of pci-bridge device to realize.
v1:
* patch1: fix unreasonable return value check
Mao Zhongyi (7):
pci: Clean up error checking in pci_add_capability()
pci: Add comment for pci_add_capability2()
pci: Fix the return value checking
Hi, Michael
On 06/06/2017 11:31 PM, Michael S. Tsirkin wrote:
On Tue, Jun 06, 2017 at 07:26:29PM +0800, Mao Zhongyi wrote:
It reports a code style problem(ERROR: "foo * bar" should be "foo *bar")
when running checkpatch.pl. So fix it to conform to the coding standards.
Cc:
!
OK, I see.
Thanks for your kind reminder.
Mao
On Fri, Jun 02, 2017 at 03:54:36PM +0800, Mao Zhongyi wrote:
v2:
* patch1: subject and commit message was rewrited by markus.
* patch2: comment was added to pci_add_capability2().
* patch3: a new patch that fix the wrong return value judgment
Hi, Eduardo
On 06/06/2017 10:52 PM, Eduardo Habkost wrote:
On Tue, Jun 06, 2017 at 07:26:30PM +0800, Mao Zhongyi wrote:
Add Error argument for pci_add_capability() to leverage the errp
to pass info on errors. This way is helpful for its callers to
make a better error handling when moving to
Hi, Markus
On 06/07/2017 03:05 PM, Markus Armbruster wrote:
Mao Zhongyi writes:
Hi, Eduardo
On 06/06/2017 10:52 PM, Eduardo Habkost wrote:
On Tue, Jun 06, 2017 at 07:26:30PM +0800, Mao Zhongyi wrote:
Add Error argument for pci_add_capability() to leverage the errp
to pass info on errors
Signed-off-by: Mao Zhongyi
---
include/qemu/sockets.h | 15 ---
util/qemu-sockets.c| 34 --
2 files changed, 49 deletions(-)
diff --git a/include/qemu/sockets.h b/include/qemu/sockets.h
index 7abffc4..8eb0172 100644
--- a/include/qemu/sockets.h
something like SOCK_RAW, it
should be explicitly handled.
So, drop the 'default' case since it is broken already.
Cc: jasow...@redhat.com
Cc: arm...@redhat.com
Cc: berra...@redhat.com
Cc: arm...@redhat.com
Suggested-by: Markus Armbruster
Suggested-by: Daniel P. Berrange
Signed-off-by: M
error. Now, fix it
to set an
error when it fails.
Cc: jasow...@redhat.com
Cc: arm...@redhat.com
Cc: berra...@redhat.com
Cc: kra...@redhat.com
Cc: pbonz...@redhat.com
Mao Zhongyi (4):
net/socket: Drop the odd 'default' case and comment
net/net: Convert parse_host_port() to Error
net
Cc: berra...@redhat.com
Cc: kra...@redhat.com
Cc: pbonz...@redhat.com
Cc: jasow...@redhat.com
Cc: arm...@redhat.com
Signed-off-by: Mao Zhongyi
---
include/qemu/sockets.h | 2 +-
net/net.c | 21 -
net/socket.c | 37
Currently, net_socket_mcast_create(), net_socket_fd_init_dgram() and
net_socket_fd_init() use the function such as fprintf(), perror() to
report an error message.
Now, convert these functions to Error.
Cc: jasow...@redhat.com
Cc: arm...@redhat.com
Cc: berra...@redhat.com
Signed-off-by: Mao
same time, add many explicit error handling message when it fails.
Cc: jasow...@redhat.com
Cc: arm...@redhat.com
Signed-off-by: Mao Zhongyi
---
net/socket.c | 37 ++---
1 file changed, 22 insertions(+), 15 deletions(-)
diff --git a/net/socket.c b/net/socket.c
ind
pci_add_capability returns a strictly positive value on success,
correct asserts.
Cc: dmi...@daynix.com
Cc: jasow...@redhat.com
Cc: kra...@redhat.com
Cc: alex.william...@redhat.com
Cc: arm...@redhat.com
Signed-off-by: Mao Zhongyi
---
hw/net/e1000e.c | 2 +-
hw/net/eepro100.c | 2 +-
hw/usb
Comments for pci_add_capability2() to explain the return
value. This may help to make a correct return value check
for its callers.
Cc: m...@redhat.com
Cc: mar...@redhat.com
Cc: arm...@redhat.com
Suggested-by: Markus Armbruster
Signed-off-by: Mao Zhongyi
---
hw/pci/pci.c | 6 ++
1 file
: arm...@redhat.com
Signed-off-by: Mao Zhongyi
---
hw/pci-bridge/i82801b11.c | 11 +--
hw/pci-bridge/pcie_root_port.c | 15 ++-
hw/pci-bridge/xio3130_downstream.c | 20 +---
hw/pci-bridge/xio3130_upstream.c | 20 +---
hw/pci
Cc: pbonz...@redhat.com
Cc: r...@twiddle.net
Cc: ehabk...@redhat.com
Cc: m...@redhat.com
Cc: dmi...@daynix.com
Cc: jasow...@redhat.com
Cc: mar...@redhat.com
Cc: alex.william...@redhat.com
Cc: arm...@redhat.com
Suggested-by: Eduardo Habkost
Signed-off-by: Mao Zhongyi
---
hw/i386/amd_iommu
om
Cc: arm...@redhat.com
Cc: dmi...@daynix.com
Cc: jasow...@redhat.com
Cc: kra...@redhat.com
Cc: alex.william...@redhat.com
Cc: pbonz...@redhat.com
Cc: r...@twiddle.net
Cc: ehabk...@redhat.com
Mao Zhongyi (7):
pci: Clean up error checking in pci_add_capability()
pci: Add comment for pci_add_c
In order to propagate error message better, convert shpc_init() to
Error also convert the pci_bridge_dev_initfn() to realize.
Cc: m...@redhat.com
Cc: mar...@redhat.com
Cc: arm...@redhat.com
Signed-off-by: Mao Zhongyi
---
hw/pci-bridge/pci_bridge_dev.c | 21 -
hw/pci/shpc.c
redhat.com
Cc: mar...@redhat.com
Cc: alex.william...@redhat.com
Cc: arm...@redhat.com
Signed-off-by: Mao Zhongyi
---
hw/i386/amd_iommu.c | 24 +---
hw/net/e1000e.c | 30 ++
hw/net/eepro100.c | 18 ++
hw/
: Mao Zhongyi
Reviewed-by: Marcel Apfelbaum
---
hw/pci/pci.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 98ccc27..53566b8 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -2270,12 +2270,8 @@ int pci_add_capability(PCIDevice *pdev, uint8_t
Hi, Eduardo
On 06/09/2017 09:53 PM, Eduardo Habkost wrote:
On Fri, Jun 09, 2017 at 07:24:40PM +0800, Mao Zhongyi wrote:
After the patch 'Make errp the last parameter of pci_add_capability()',
pci_add_capability() and pci_add_capability2() now do exactly the same.
So drop t
Hi, Markus
On 06/09/2017 09:22 PM, Markus Armbruster wrote:
Mao Zhongyi writes:
In the net_socket_fd_init(), the 'default' case and comment is odd.
If @fd really was a pty, getsockopt() would fail with ENOTSOCK. If
@fd was a socket, but neither SOCK_DGRAM nor SOCK_STREAM. It sho
Comments for pci_add_capability2() to explain the return
value. This may help to make a correct return value check
for its callers.
Cc: m...@redhat.com
Cc: mar...@redhat.com
Cc: arm...@redhat.com
Suggested-by: Markus Armbruster
Signed-off-by: Mao Zhongyi
---
hw/pci/pci.c | 6 ++
1 file
value is worth. So fix the return type to avoid
it.
Cc: pbonz...@redhat.com
Cc: r...@twiddle.net
Cc: ehabk...@redhat.com
Cc: m...@redhat.com
Cc: arm...@redhat.com
Signed-off-by: Mao Zhongyi
---
hw/i386/kvm/pci-assign.c | 18 ++
1 file changed, 6 insertions(+), 12 deletions
: Mao Zhongyi
Reviewed-by: Marcel Apfelbaum
---
hw/pci/pci.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 98ccc27..53566b8 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -2270,12 +2270,8 @@ int pci_add_capability(PCIDevice *pdev, uint8_t
In order to propagate error message better, convert shpc_init() to
Error also convert the pci_bridge_dev_initfn() to realize.
Cc: m...@redhat.com
Cc: mar...@redhat.com
Cc: arm...@redhat.com
Signed-off-by: Mao Zhongyi
---
hw/pci-bridge/pci_bridge_dev.c | 21 -
hw/pci/shpc.c
daynix.com
Cc: jasow...@redhat.com
Cc: kra...@redhat.com
Cc: alex.william...@redhat.com
Cc: pbonz...@redhat.com
Cc: r...@twiddle.net
Cc: ehabk...@redhat.com
Mao Zhongyi (9):
pci: Clean up error checking in pci_add_capability()
pci: Add comment for pci_add_capability2()
pci: Fix the return value
: arm...@redhat.com
Signed-off-by: Mao Zhongyi
---
hw/pci-bridge/i82801b11.c | 11 +--
hw/pci-bridge/pcie_root_port.c | 15 ++-
hw/pci-bridge/xio3130_downstream.c | 20 +---
hw/pci-bridge/xio3130_upstream.c | 20 +---
hw/pci
redhat.com
Cc: mar...@redhat.com
Cc: alex.william...@redhat.com
Cc: arm...@redhat.com
Signed-off-by: Mao Zhongyi
---
hw/i386/amd_iommu.c | 24 +---
hw/net/e1000e.c | 30 ++
hw/net/eepro100.c | 18 ++
hw/
Cc: pbonz...@redhat.com
Cc: r...@twiddle.net
Cc: ehabk...@redhat.com
Cc: m...@redhat.com
Cc: dmi...@daynix.com
Cc: jasow...@redhat.com
Cc: mar...@redhat.com
Cc: alex.william...@redhat.com
Cc: arm...@redhat.com
Suggested-by: Eduardo Habkost
Signed-off-by: Mao Zhongyi
---
hw/i386/kvm/pci-ass
...@redhat.com
Cc: r...@twiddle.net
Cc: ehabk...@redhat.com
Cc: m...@redhat.com
Cc: arm...@redhat.com
Signed-off-by: Mao Zhongyi
---
hw/i386/kvm/pci-assign.c | 22 +++---
1 file changed, 7 insertions(+), 15 deletions(-)
diff --git a/hw/i386/kvm/pci-assign.c b/hw/i386/kvm/pci-assign.c
index
pci_add_capability returns a strictly positive value on success,
correct asserts.
Cc: dmi...@daynix.com
Cc: jasow...@redhat.com
Cc: kra...@redhat.com
Cc: alex.william...@redhat.com
Cc: arm...@redhat.com
Signed-off-by: Mao Zhongyi
---
hw/net/e1000e.c | 2 +-
hw/net/eepro100.c | 2 +-
hw/usb
something like SOCK_RAW, it
should be explicitly handled.
So, drop the 'default' case since it is broken already.
Cc: jasow...@redhat.com
Cc: arm...@redhat.com
Cc: berra...@redhat.com
Cc: arm...@redhat.com
Suggested-by: Markus Armbruster
Suggested-by: Daniel P. Berrange
Signed-off-by: M
dhat.com
Cc: kra...@redhat.com
Cc: pbonz...@redhat.com
Mao Zhongyi (4):
net/socket: Drop the odd 'default' case and comment
net/net: Convert parse_host_port() to Error
net/socket: Convert error report message to Error
net/socket: Improve -net socket error reporting
include/qem
same time, add many explicit error handling message when it fails.
Cc: jasow...@redhat.com
Cc: arm...@redhat.com
Signed-off-by: Mao Zhongyi
---
net/socket.c | 37 ++---
1 file changed, 22 insertions(+), 15 deletions(-)
diff --git a/net/socket.c b/net/socket.c
ind
Cc: berra...@redhat.com
Cc: kra...@redhat.com
Cc: pbonz...@redhat.com
Cc: jasow...@redhat.com
Cc: arm...@redhat.com
Signed-off-by: Mao Zhongyi
---
include/qemu/sockets.h | 2 +-
net/net.c | 21 -
net/socket.c | 37
Currently, net_socket_mcast_create(), net_socket_fd_init_dgram() and
net_socket_fd_init() use the function such as fprintf(), perror() to
report an error message.
Now, convert these functions to Error.
Cc: jasow...@redhat.com
Cc: arm...@redhat.com
Cc: berra...@redhat.com
Signed-off-by: Mao
On 05/06/2017 12:39 AM, Daniel P. Berrange wrote:
On Wed, Apr 26, 2017 at 04:04:14PM +0800, Mao Zhongyi wrote:
v2:
* PATCH 02 reworking of patch 2 following Markus's suggestion that convert
error_report()
in the function called by net_socket_*_init() to Error. Also add many error
han
shorten to at most 9 chars
qemu-system-x86_64: -device rocker,name=qemu-rocker: Device initialization
failed
Convert pci_rocker_init() to Error to get rid of the unwanted second
error message.
Cc: j...@resnulli.us
Cc: jasow...@redhat.com
Signed-off-by: Mao Zhongyi
---
hw/net/rocker/rocker.c
Hi, Philippe
On 05/14/2017 05:04 AM, Philippe Mathieu-Daudé wrote:
Hi Mao,
You can use shorter patch subject "net/rocker" instead of
"hw/net/rocker/rocker".
Thanks for your suggestion :)OK, will do the fix right away.
On 05/12/2017 05:35 AM, Mao Zhongyi wrote:
Conv
shorten to at most 9 chars
qemu-system-x86_64: -device rocker,name=qemu-rocker: Device initialization
failed
Convert pci_rocker_init() to Error to get rid of the unwanted second
error message.
Cc: j...@resnulli.us
Cc: jasow...@redhat.com
Cc: f4...@amsat.org
Signed-off-by: Mao Zhongyi
---
hw
1 - 100 of 430 matches
Mail list logo