[libvirt] [PATCH] Remove new lines from debug messages

Jiri Denemark jdenemar at redhat.com
Tue Oct 27 18:21:43 UTC 2015


On Tue, Oct 27, 2015 at 17:18:40 +0100, Andrea Bolognani wrote:
> On Tue, 2015-10-27 at 16:29 +0100, Jiri Denemark wrote:
> > Signed-off-by: Jiri Denemark <jdenemar at redhat.com>
> > ---
> >  src/nwfilter/nwfilter_gentech_driver.c |  2 +-
> >  src/nwfilter/nwfilter_learnipaddr.c    | 10 +++++-----
> >  src/rpc/virnetsocket.c                 |  2 +-
> >  src/util/virfile.c                     |  2 +-
> >  src/util/virhash.c                     |  2 +-
> >  src/util/virnetdevmacvlan.c            | 28 +++++++++++++-----------
> > --
> >  src/util/virprocess.c                  |  2 +-
> >  src/xen/xend_internal.c                |  2 +-
> >  tests/virhostdevtest.c                 | 36 +++++++++++++++++-------
> > ----------
> >  tests/virnetsockettest.c               |  2 +-
> >  tests/virtimetest.c                    |  2 +-
> >  11 files changed, 45 insertions(+), 45 deletions(-)
> 
> Looks good, I would squash in the following:
> 
> diff --git a/src/util/virnetdevmacvlan.c b/src/util/virnetdevmacvlan.c
> index f85bd3e..6e00107 100644
> --- a/src/util/virnetdevmacvlan.c
> +++ b/src/util/virnetdevmacvlan.c
> @@ -565,8 +565,7 @@ virNetDevMacVLanVPortProfileCallback(struct
> nlmsghdr *hdr,
>              }
>              if (nla_parse_nested(tb3, IFLA_PORT_MAX, tb_vf_ports,
>                  ifla_port_policy)) {
> -                VIR_DEBUG("nested parsing on level 2"
> -                          " failed");
> +                VIR_DEBUG("nested parsing on level 2 failed");
>              }
>              if (tb3[IFLA_PORT_VF]) {
>                  VIR_DEBUG("IFLA_PORT_VF = %d",
> 
> and note in the commit message that you're also removing
> trailing full stops from the messages.

I dropped this hunk completely, removing full stops deserves a separate
patch since we have a lot of them.

> I see there are a few instances remaining:
> 
>   src/libvirt.c:
>     VIR_DEBUG("name \"%s\" to URI components:\n"

This is a multiline debug message and the "\n" is not at the end of the
message.

>   src/network/bridge_driver_linux.c:
>     VIR_DEBUG("%s output:\n%s", PROC_NET_ROUTE, buf);

Not at the end of the message.

>   src/xenconfig/xen_sxpr.c:
>     VIR_DEBUG("Formatted sexpr: \n%s", bufout);

Same here.

> plus one more if we also consider warnings:
> 
>   src/nwfilter/nwfilter_dhcpsnoop.c:
>     VIR_WARN("Waiting for snooping threads to terminate: %u\n",

Removed.

> Are those exceptions or did you just miss them? If the
> latter, adding a syntax-check for this is probably a good
> idea :)

Unfortunately, they are exceptions and that's why I didn't add a
syntax-check rule.

Jirka




More information about the libvir-list mailing list