From b16352acf3105000e14f194b556e159d5d06cff9 Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Mon, 4 Mar 2013 18:41:28 +0200 Subject: ccid-card-passthru, dev-smartcard-reader: add debug environment variables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Introduces a new utility function: parse_debug_env to avoid code duplication. This overrides whatever debug value is set on the corresponding devices from the command line, and is meant to ease the usage with any management stack. For libvirt you can set environment variables by extending the dom namespace, i.e: Signed-off-by: Alon Levy Reviewed-by: Marc-André Lureau --- include/qemu-common.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/qemu-common.h b/include/qemu-common.h index 3b1873e..a39cdba 100644 --- a/include/qemu-common.h +++ b/include/qemu-common.h @@ -482,4 +482,9 @@ can_use_buffer_find_nonzero_offset(const void *buf, size_t len) } size_t buffer_find_nonzero_offset(const void *buf, size_t len); +/* + * helper to parse debug environment variables + */ +int parse_debug_env(const char *name, int max, int initial); + #endif -- cgit v1.1