summaryrefslogtreecommitdiff
path: root/src/internal.h
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2008-04-25 20:46:13 +0000
committerDaniel P. Berrange <berrange@redhat.com>2008-04-25 20:46:13 +0000
commit49956f046907035d9b43ed3462beb78c9b3d621e (patch)
tree8f7c80ac5a32c46fd4a18a55f089c251b3a1f555 /src/internal.h
parentd62a9f2390d9a642e4deef56529a8ce7c8333540 (diff)
downloadlibvirt-49956f046907035d9b43ed3462beb78c9b3d621e.tar.gz
Implement serial & parallel device support for QEMU driver
Diffstat (limited to 'src/internal.h')
-rw-r--r--src/internal.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/internal.h b/src/internal.h
index 6bed4770d2..67d31b3639 100644
--- a/src/internal.h
+++ b/src/internal.h
@@ -66,6 +66,10 @@ extern "C" {
#define STRNEQLEN(a,b,n) (strncmp((a),(b),(n)) != 0)
#define STRCASENEQLEN(a,b,n) (strncasecmp((a),(b),(n)) != 0)
+
+#define NUL_TERMINATE(buf) do { (buf)[sizeof(buf)-1] = '\0'; } while (0)
+#define ARRAY_CARDINALITY(Array) (sizeof (Array) / sizeof *(Array))
+
/* If configured with --enable-debug=yes then library calls
* are printed to stderr for debugging.
*/