[PATCH 4/7] Introduce vircommandpriv.h for functions used by tests

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

 



So far it's just virCommandSetDryRun.
---
 src/Makefile.am                |  2 +-
 src/util/vircommand.c          |  2 +-
 src/util/vircommand.h          |  2 --
 src/util/vircommandpriv.h      | 28 ++++++++++++++++++++++++++++
 tests/virkmodtest.c            |  2 +-
 tests/virnetdevbandwidthtest.c |  2 +-
 6 files changed, 32 insertions(+), 6 deletions(-)
 create mode 100644 src/util/vircommandpriv.h

diff --git a/src/Makefile.am b/src/Makefile.am
index a88b258..25b33a7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -91,7 +91,7 @@ UTIL_SOURCES =							\
 		util/virbuffer.c util/virbuffer.h		\
 		util/vircgroup.c util/vircgroup.h util/vircgrouppriv.h	\
 		util/virclosecallbacks.c util/virclosecallbacks.h		\
-		util/vircommand.c util/vircommand.h		\
+		util/vircommand.c util/vircommand.h util/vircommandpriv.h \
 		util/virconf.c util/virconf.h			\
 		util/vircrypto.c util/vircrypto.h		\
 		util/virdbus.c util/virdbus.h util/virdbuspriv.h	\
diff --git a/src/util/vircommand.c b/src/util/vircommand.c
index db4166f..7a799f2 100644
--- a/src/util/vircommand.c
+++ b/src/util/vircommand.c
@@ -40,7 +40,7 @@
 # include <sys/apparmor.h>
 #endif
 
-#include "vircommand.h"
+#include "vircommandpriv.h"
 #include "viralloc.h"
 #include "virerror.h"
 #include "virutil.h"
diff --git a/src/util/vircommand.h b/src/util/vircommand.h
index 7485edc..10b4fa2 100644
--- a/src/util/vircommand.h
+++ b/src/util/vircommand.h
@@ -186,6 +186,4 @@ void virCommandAbort(virCommandPtr cmd);
 void virCommandFree(virCommandPtr cmd);
 
 void virCommandDoAsyncIO(virCommandPtr cmd);
-
-void virCommandSetDryRun(virBufferPtr buf);
 #endif /* __VIR_COMMAND_H__ */
diff --git a/src/util/vircommandpriv.h b/src/util/vircommandpriv.h
new file mode 100644
index 0000000..2fbf3de
--- /dev/null
+++ b/src/util/vircommandpriv.h
@@ -0,0 +1,28 @@
+/*
+ * vircommandpriv.h: Functions for testing virCommand APIs
+ *
+ * Copyright (C) 2014 Red Hat, Inc.
+ *
+ * This library 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; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library.  If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef __VIR_COMMAND_PRIV_H__
+# define __VIR_COMMAND_PRIV_H__
+
+# include "vircommand.h"
+
+void virCommandSetDryRun(virBufferPtr buf);
+#endif /* __VIR_COMMAND_PRIV_H__ */
diff --git a/tests/virkmodtest.c b/tests/virkmodtest.c
index c6f5a72..e23ef67 100644
--- a/tests/virkmodtest.c
+++ b/tests/virkmodtest.c
@@ -23,7 +23,7 @@
 #ifdef __linux__
 
 # include <stdlib.h>
-# include "vircommand.h"
+# include "vircommandpriv.h"
 # include "virkmod.h"
 # include "virstring.h"
 
diff --git a/tests/virnetdevbandwidthtest.c b/tests/virnetdevbandwidthtest.c
index 073fdf8..ab5d312 100644
--- a/tests/virnetdevbandwidthtest.c
+++ b/tests/virnetdevbandwidthtest.c
@@ -21,7 +21,7 @@
 #include <config.h>
 
 #include "testutils.h"
-#include "vircommand.h"
+#include "vircommandpriv.h"
 #include "virnetdevbandwidth.h"
 #include "netdev_bandwidth_conf.c"
 
-- 
1.8.3.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]