|
From: | Paolo Bonzini |
Subject: | Re: [Qemu-devel] Contribution - L2TPv3 transport |
Date: | Tue, 04 Mar 2014 17:55:26 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 |
Il 04/03/2014 17:48, Anton Ivanov (antivano) ha scritto:
>> +static ssize_t net_l2tpv3_receive_dgram_iov(NetClientState *nc, const struct iovec *iov, int iovcnt)> Long line; you can split after , to fit within 80 columns.OK>>> +{ >> + NetL2TPV3State *s = DO_UPCAST(NetL2TPV3State, nc, nc); >> + >> + struct msghdr message; >> + int ret; >> + >> + if (iovcnt > MAX_L2TPV3_IOVCNT - 1) { >> + fprintf(stderr, "iovec too long %d > %d, change l2tpv3.h\n", iovcnt, MAX_L2TPV3_IOVCNT); >> + return -1;> Is printing to stderr always the right thing to do? It seems to me that > you should look into using QError.Thanks, will look into it.
Actually no, this does not need to use QError. You just need "error_report", which is the same as fprintf(stderr) but will add nice timestamps in front of the error message if enabled.
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |