Re: [Qemu-devel] [PULLv2 00/32] More work towards libslirp

2019-02-05 Thread Samuel Thibault
Peter Maydell, le mar. 05 févr. 2019 18:24:45 +, a ecrit:
> /home/pm215/qemu/slirp/misc.c:166:5: error: unknown type name ‘QemuGSpawnFds’

D'oh...

Fixed in v3.

Samuel



Re: [Qemu-devel] [PULLv2 00/32] More work towards libslirp

2019-02-05 Thread Peter Maydell
On Tue, 5 Feb 2019 at 16:59, Samuel Thibault
 wrote:
>
> The following changes since commit 01a9a51ffaf4699827ea6425cb2b834a356e159d:
>
>   Merge remote-tracking branch 'remotes/kraxel/tags/ui-20190205-pull-request' 
> into staging (2019-02-05 14:01:29 +)
>
> are available in the Git repository at:
>
>   https://people.debian.org/~sthibault/qemu.git tags/samuel-thibault
>
> for you to fetch changes up to cf20be34d44a953c9b52a4d5cf6f4232968e6f3c:
>
>   slirp: API is extern C (2019-02-05 18:56:17 +0200)
>
> 
> More work towards libslirp

Fails to build, ppc64, x86-64, aarch32, s390x, etc:

/home/pm215/qemu/slirp/misc.c: In function ‘g_spawn_async_with_fds_slirp’:
/home/pm215/qemu/slirp/misc.c:166:5: error: unknown type name ‘QemuGSpawnFds’
 QemuGSpawnFds setup = {
 ^
/home/pm215/qemu/slirp/misc.c:167:9: error: field name not in record
or union initializer
 .child_setup = child_setup,
 ^
/home/pm215/qemu/slirp/misc.c:167:9: error: (near initialization for ‘setup’)
/home/pm215/qemu/slirp/misc.c:167:9: error: initialization makes
integer from pointer without a cast [-Werror]
/home/pm215/qemu/slirp/misc.c:167:9: error: (near initialization for
‘setup’) [-Werror]
/home/pm215/qemu/slirp/misc.c:168:9: error: field name not in record
or union initializer
 .user_data = user_data,
 ^
/home/pm215/qemu/slirp/misc.c:168:9: error: (near initialization for ‘setup’)
/home/pm215/qemu/slirp/misc.c:168:9: error: excess elements in scalar
initializer [-Werror]
/home/pm215/qemu/slirp/misc.c:168:9: error: (near initialization for
‘setup’) [-Werror]
/home/pm215/qemu/slirp/misc.c:169:9: error: field name not in record
or union initializer
 .stdin_fd = stdin_fd,
 ^
/home/pm215/qemu/slirp/misc.c:169:9: error: (near initialization for ‘setup’)
/home/pm215/qemu/slirp/misc.c:169:9: error: excess elements in scalar
initializer [-Werror]
/home/pm215/qemu/slirp/misc.c:169:9: error: (near initialization for
‘setup’) [-Werror]
/home/pm215/qemu/slirp/misc.c:170:9: error: field name not in record
or union initializer
 .stdout_fd = stdout_fd,
 ^
/home/pm215/qemu/slirp/misc.c:170:9: error: (near initialization for ‘setup’)
/home/pm215/qemu/slirp/misc.c:170:9: error: excess elements in scalar
initializer [-Werror]
/home/pm215/qemu/slirp/misc.c:170:9: error: (near initialization for
‘setup’) [-Werror]
/home/pm215/qemu/slirp/misc.c:171:9: error: field name not in record
or union initializer
 .stderr_fd = stderr_fd,
 ^
/home/pm215/qemu/slirp/misc.c:171:9: error: (near initialization for ‘setup’)
/home/pm215/qemu/slirp/misc.c:171:9: error: excess elements in scalar
initializer [-Werror]
/home/pm215/qemu/slirp/misc.c:171:9: error: (near initialization for
‘setup’) [-Werror]
cc1: all warnings being treated as errors

FreeBSD fails in a slightly different way:

slirp/misc.c:166:5: error: use of undeclared identifier 'QemuGSpawnFds'
QemuGSpawnFds setup = {
^
slirp/misc.c:175:51: error: use of undeclared identifier 'setup'
 slirp_gspawn_fds_setup, &setup,
  ^
2 errors generated.

thanks
-- PMM



Re: [Qemu-devel] [PULLv2 00/32] More work towards libslirp

2019-02-05 Thread no-reply
Patchew URL: 
https://patchew.org/QEMU/20190205165927.26599-1-samuel.thiba...@ens-lyon.org/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Subject: [Qemu-devel] [PULLv2 00/32] More work towards libslirp
Type: series
Message-id: 20190205165927.26599-1-samuel.thiba...@ens-lyon.org

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
   01a9a51ffa..68df0c30ed  master -> master
 t [tag update]
patchew/20190205151810.571-1-peter.mayd...@linaro.org -> 
patchew/20190205151810.571-1-peter.mayd...@linaro.org
 * [new tag]   
patchew/20190205165927.26599-1-samuel.thiba...@ens-lyon.org -> 
patchew/20190205165927.26599-1-samuel.thiba...@ens-lyon.org
Switched to a new branch 'test'
cdc1e8f63e slirp: API is extern C
4dd78b51f2 slirp: pass opaque to all callbacks
e2e03ac7c5 slirp: use polling callbacks, drop glib requirement
865ad7fef9 slirp: remove slirp_instances list
181ccaa3f9 slirp: replace global polling with per-instance & notifier
3ca10a4b2d slirp: improve send_packet() callback
ba50ea2e00 slirp: prefer c99 types over BSD kind
46f51c952b slirp: replace remaining qemu headers dependency
4900a932e9 slirp: Move g_spawn_async_with_fds_qemu compatibility to slirp/
6c2bb4ac5a slirp: replace QEMU_BUILD_BUG_ON with G_STATIC_ASSERT
d918af2891 slirp: replace qemu qtailq with slirp own copy
775dbf5782 slirp: replace net/eth.h inclusion with own defines
9b02515930 slirp: remove now useless QEMU headers inclusions
5f8ab44f97 slirp: remove qemu timer.h dependency
04e129b0a0 slirp: add slirp own version of pstrcpy
86e8eebc85 slirp: improve windows headers inclusion
a1259feabf slirp: do not include qemu headers in libslirp.h public API header
9b30e0cc0b slirp: move QEMU state saving to a separate unit
e1beca1eae slirp: replace qemu_notify_event() with a callback
356398ae46 slirp: add unregister_poll_fd() callback
8bd42a95d1 slirp: replace qemu_set_nonblock()
1d7846a244 slirp: replace most qemu socket utilities with slirp own version
98db6a950f slirp: replace QEMU_PACKED with SLIRP_PACKED
e2ab8ac7b1 slirp: replace trace functions with DEBUG calls
4ddeb43ccf slirp: add callbacks for timer
07c6b9500c net/slirp: fix leaks on forwarding rule registration error
32a714e3c1 net/slirp: free forwarding rules on cleanup
c2ca5d7419 net/slirp: simplify checking for cmd: prefix
9fd21c2685 slirp: generalize guestfwd with a callback based approach
c4303625d0 slirp: Don't mark struct ipq or struct ipasfrag as packed
b934d1d20e slirp: Avoid marking naturally packed structs as QEMU_PACKED
ecc3a21eff slirp: Avoid unaligned 16bit memory access

=== OUTPUT BEGIN ===
1/32 Checking commit ecc3a21effe1 (slirp: Avoid unaligned 16bit memory access)
2/32 Checking commit b934d1d20e7b (slirp: Avoid marking naturally packed 
structs as QEMU_PACKED)
3/32 Checking commit c4303625d07e (slirp: Don't mark struct ipq or struct 
ipasfrag as packed)
4/32 Checking commit 9fd21c2685b4 (slirp: generalize guestfwd with a callback 
based approach)
ERROR: code indent should never use tabs
#148: FILE: slirp/misc.h:14:
+^ISlirpWriteCb write_cb;$

ERROR: code indent should never use tabs
#149: FILE: slirp/misc.h:15:
+^Ivoid *opaque;$

total: 2 errors, 0 warnings, 226 lines checked

Patch 4/32 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

5/32 Checking commit c2ca5d741993 (net/slirp: simplify checking for cmd: prefix)
6/32 Checking commit 32a714e3c121 (net/slirp: free forwarding rules on cleanup)
7/32 Checking commit 07c6b9500cc1 (net/slirp: fix leaks on forwarding rule 
registration error)
8/32 Checking commit 4ddeb43ccff0 (slirp: add callbacks for timer)
9/32 Checking commit e2ab8ac7b1de (slirp: replace trace functions with DEBUG 
calls)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#100: 
deleted file mode 100644

total: 0 errors, 1 warnings, 62 lines checked

Patch 9/32 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
10/32 Checking commit 98db6a950f0e (slirp: replace QEMU_PACKED with 
SLIRP_PACKED)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#111: 
new file mode 100644

total: 0 errors, 1 warnings, 111 lines checked

Patch 10/32 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
11/32 Checking commit 1d7846a244a7 (slirp: replace most qemu socket utilities 
with slirp own version)
ERROR: code indent should never use tabs
#130: FILE: slirp/socket.c:190:
+^Inn = slirp_recv(so->s, iov[0].iov_base, iov[0]