[libvirt] [PATCHv2 02/27] maint: print flags in hex during debug

Matthias Bolte matthias.bolte at googlemail.com
Wed Jul 13 09:49:49 UTC 2011


2011/7/8 Eric Blake <eblake at redhat.com>:
> Continuation of commit 313ac7fd, and enforce things with a syntax
> check.
>
> Technically, virNetServerClientCalculateHandleMode is not printing
> a mode_t, but rather a collection of VIR_EVENT_HANDLE_* bits;
> however, these bits are < 8, so there is no different in the
> output, and that was the easiest way to silence the new syntax check.
>
> * cfg.mk (sc_flags_debug): New syntax check.
> (exclude_file_name_regexp--sc_flags_debug): Add exemptions.
> * src/fdstream.c (virFDStreamOpenFileInternal): Print flags in
> hex, mode_t in octal.
> * src/libvirt-qemu.c (virDomainQemuMonitorCommand): Likewise.
> * src/locking/lock_driver_nop.c (virLockManagerNopInit): Likewise.
> * src/locking/lock_driver_sanlock.c (virLockManagerSanlockInit):
> Likewise.
> * src/locking/lock_manager.c: Likewise.
> * src/qemu/qemu_migration.c: Likewise.
> * src/qemu/qemu_monitor.c: Likewise.
> * src/rpc/virnetserverclient.c
> (virNetServerClientCalculateHandleMode): Print mode with %o.
> ---
>
> v2: new patch, first new syntax check
>
>  cfg.mk                            |   11 +++++++++++
>  src/fdstream.c                    |    2 +-
>  src/libvirt-qemu.c                |    5 +++--
>  src/locking/lock_driver_nop.c     |    3 ++-
>  src/locking/lock_driver_sanlock.c |    3 ++-
>  src/locking/lock_manager.c        |   11 ++++++-----
>  src/qemu/qemu_migration.c         |   16 ++++++++--------
>  src/qemu/qemu_monitor.c           |   10 +++++-----
>  src/rpc/virnetserverclient.c      |    2 +-
>  9 files changed, 39 insertions(+), 24 deletions(-)

flags_debug
src/libvirt-qemu.c:117:    VIR_DEBUG("conn=%p, pid=%u, flags=%u",
conn, pid, flags);
maint.mk: debug flag values with %x

Dan commited this after you posted your series. So ACK with that new
offender fix too.

-- 
Matthias Bolte
http://photron.blogspot.com




More information about the libvir-list mailing list