[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 1 of 5 RFC] blktap3: Introduce fundamental xenio headers



This patch introduces header files xenio-common.h, which contains common
definitions used by the xenio daemon, libxenio, and the users of libxenio, and
xenio-private.h, which contains private definitions used by the xenio daemon
and libxenio.

diff -r 84f51929a064 -r d426fc267197 tools/blktap3/xenio/xenio-common.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/blktap3/xenio/xenio-common.h        Wed Nov 28 14:11:43 2012 +0000
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2012      Citrix Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; version 2.1 only. with the special
+ * exception on linking described in file LICENSE.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * Common definitions used by the xenio daemon, libxenio, and the users of
+ * libxenio.
+ */
+
+#ifndef __XENIO_COMMON_H__
+#define __XENIO_COMMON_H__
+
+#include <assert.h>
+
+/**
+ * Block I/O protocol
+ *
+ * TODO Why start from 1?
+ * TODO Define a macro that tells whether a protocol is supported.
+ */
+enum {
+    XENIO_BLKIF_PROTO_NATIVE = 1,
+    XENIO_BLKIF_PROTO_X86_32 = 2,
+    XENIO_BLKIF_PROTO_X86_64 = 3,
+};
+#endif /* __XENIO_COMMON_H__ */
diff -r 84f51929a064 -r d426fc267197 tools/blktap3/xenio/xenio-private.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/blktap3/xenio/xenio-private.h       Wed Nov 28 14:11:43 2012 +0000
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2012      Citrix Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; version 2.1 only. with the special
+ * exception on linking described in file LICENSE.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * Private definitions used by the xenio daemon and libxenio.
+ */
+
+#ifndef __XENIO_PRIVATE_H__
+#define __XENIO_PRIVATE_H__
+
+#include "blktap3.h"
+#include <xenctrl.h>
+#include <stdlib.h>
+#include <syslog.h>
+
+void xenio_log(int prio, const char *fmt, ...);
+void (*xenio_vlog) (int prio, const char *fmt, va_list ap);
+
+#define DBG(_fmt, _args...)  xenio_log(LOG_DEBUG, "%s:%d "_fmt, __FILE__, \
+        __LINE__, ##_args)
+#define INFO(_fmt, _args...) xenio_log(LOG_INFO, _fmt, ##_args)
+#define WARN(_fmt, _args...) xenio_log(LOG_WARNING, "%s:%d "_fmt, __FILE__, \
+        __LINE__, ##_args)
+
+#endif /* __XENIO_PRIVATE_H__ */

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.