# HG changeset patch
# User Jay Gagnon <grendel(a)linux.vnet.ibm.com>
# Date 1193686792 14400
# Node ID 4667bc86331dbde59f7ddbde9766d7025385eaec
# Parent f2966180a03a8604d32159b12e44db18ca429a91
Make the location of the disk pool config file a compile-time option. No checks are done
at the moment, mostly due to my lack of m4 skills. Suggestions are welcome or we can do
the check in the provider itself.
Signed-off-by: Jay Gagnon <grendel(a)linux.vnet.ibm.com>
diff -r f2966180a03a -r 4667bc86331d acinclude.m4
--- a/acinclude.m4 Sat Oct 27 10:16:03 2007 -0700
+++ b/acinclude.m4 Mon Oct 29 15:39:52 2007 -0400
@@ -463,3 +463,12 @@ AC_DEFUN([DEFINE_MAXMEM],
AC_DEFINE_UNQUOTED([MAX_MEM], $1, [Max memory for a guest.])
]
)
+
+#
+# Define disk pool config.
+#
+AC_DEFUN([DEFINE_DISK_CONFIG],
+ [
+ AC_DEFINE_UNQUOTED([DISK_POOL_CONFIG], "$1", [Disk pool config filepath.])
+ ]
+)
\ No newline at end of file
diff -r f2966180a03a -r 4667bc86331d configure.ac
--- a/configure.ac Sat Oct 27 10:16:03 2007 -0700
+++ b/configure.ac Mon Oct 29 15:39:52 2007 -0400
@@ -35,6 +35,11 @@ AC_ARG_VAR([TESTSUITEDIR],[the directory
AC_ARG_VAR([TESTSUITEDIR],[the directory where the SBLIM testsuite is installed.
])
+AC_ARG_WITH([diskconfig],
+ [ --with-diskconfig=PATH Set config file for disk pool.
(default=/tmp/diskpool.conf)],
+ [DEFINE_DISK_CONFIG($with_diskconfig)],
+ [DEFINE_DISK_CONFIG(/tmp/diskpool.conf)]
+)
AC_ARG_WITH([maxmem],
[ --with-maxmem=FOO Set max memory (MB) for a guest.],
[DEFINE_MAXMEM($with_maxmem)],
diff -r f2966180a03a -r 4667bc86331d src/Virt_DevicePool.c
--- a/src/Virt_DevicePool.c Sat Oct 27 10:16:03 2007 -0700
+++ b/src/Virt_DevicePool.c Mon Oct 29 15:39:52 2007 -0400
@@ -32,6 +32,8 @@
#include <cmpift.h>
#include <cmpimacs.h>
+#include "config.h"
+
#include "misc_util.h"
#include "hostres.h"
#include "device_parsing.h"
@@ -42,8 +44,6 @@
#include "svpc_types.h"
static const CMPIBroker *_BROKER;
-
-#define DISK_POOL_CONFIG "/tmp/diskpool.conf"
char *device_pool_names[] = {"ProcessorPool", "MemoryPool", NULL};
Show replies by date
JG> # HG changeset patch
JG> # User Jay Gagnon <grendel(a)linux.vnet.ibm.com>
JG> # Date 1193686792 14400
JG> # Node ID 4667bc86331dbde59f7ddbde9766d7025385eaec
JG> # Parent f2966180a03a8604d32159b12e44db18ca429a91
JG> Make the location of the disk pool config file a compile-time
JG> option. No checks are done at the moment, mostly due to my lack
JG> of m4 skills. Suggestions are welcome or we can do the check in
JG> the provider itself.
Works for me. +1
The provider handles a lack of a config file as the situation where no
disk pools are defined, which I think is valid.
Thanks Jay!
--
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms(a)us.ibm.com