On Tue, Jan 30, 2018 at 06:24:19PM +0100, Pino Toscano wrote:
Do a configure check for the OPEN_UNSAFE flag in the OCaml binding
of
Hivex, using it only when available. This makes it possible to use
hivex < 1.3.14 to build libguestfs (the daemon, actually).
Amend the building documentation accordingly.
---
.gitignore | 1 +
configure.ac | 1 +
daemon/Makefile.am | 2 ++
daemon/config_daemon.ml.in | 20 ++++++++++++++++++++
daemon/config_daemon.mli | 19 +++++++++++++++++++
I guess this should be daemon_config.ml etc for consistency
with guestfs_config.ml used elsewhere.
diff --git a/daemon/config_daemon.mli b/daemon/config_daemon.mli
new file mode 100644
index 000000000..1d358b7fd
--- /dev/null
+++ b/daemon/config_daemon.mli
@@ -0,0 +1,19 @@
+(* guestfsd
+ * Copyright (C) 2018 Red Hat Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *)
+
+val hivex_flag_unsafe : Hivex.open_flag list
I can see why you made this a list, because it helps with
text inclusion, but it's still the wrong type.
I think rewriting the macro so:
+AS_IF([test "x$have_Hivex_OPEN_UNSAFE" =
"xno"],[
+ HIVEX_OPEN_UNSAFE_FLAG=""
this becomes None
+],[
+ HIVEX_OPEN_UNSAFE_FLAG=" Hivex.OPEN_UNSAFE "
and this becomes ‘Some Hivex.OPEN_UNSAFE’ allows you to
use an option type.
ACK if these changes are made.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top