summaryrefslogtreecommitdiffstats
path: root/Makefile.am
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2009-11-20 14:10:06 +0000
committerRichard Jones <rjones@redhat.com>2009-11-20 18:03:36 +0000
commit2d9953097b6d3b71122d444a4550047e97aee009 (patch)
tree6737890f7e75cc83b635eccf2fb839b5cec3c616 /Makefile.am
parent8fd7f255d611d2092a244c4a48c6b7b4529e98b1 (diff)
downloadlibguestfs-2d9953097b6d3b71122d444a4550047e97aee009.tar.gz
libguestfs-2d9953097b6d3b71122d444a4550047e97aee009.tar.xz
libguestfs-2d9953097b6d3b71122d444a4550047e97aee009.zip
availability: Add optional groups and implement guestfs_available call.
The current groups are defined very conservatively using the following criteria: (a) Would be impossible to implement on Windows because of sheer architectural differences (eg: mknod). (b) Already optional (augeas, inotify). (c) Not currently optional but not implemented on older RHEL and Debian releases (ntfs-3g.probe, scrub, zerofree). The optional groups I've defined according to these criteria are: . augeas . inotify . linuxfsuuid . linuxmodules . linuxxattrs . lvm2 . mknod . ntfs3g . scrub . selinux . zerofree (Note that these choices don't prevent us from adding more optional groups in future. On the other hand to avoid breaking ABIs we would not wish to change the above groups). The rest of this large commit is really just implementation: Each optional function is classified using Optional "group" flag in the generator. The daemon has to implement a function int optgroup_<name>_available (void); for each optional group. Some of these functions are fixed at compile time, and some do simple run-time tests. The do_available implementation in the daemon looks up the correct function in a table and runs it. We document the optional groups in the guestfs(3) man page. Also: I added a NOT_AVAILABLE macro in order to unify all the existing places where we had a message equivalent to "function __func__ is not available".
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am34
1 files changed, 25 insertions, 9 deletions
diff --git a/Makefile.am b/Makefile.am
index 9332a10d..bbdb0ed4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -57,8 +57,9 @@ SUBDIRS += haskell
endif
generator_built = \
- guestfs-structs.pod \
guestfs-actions.pod \
+ guestfs-availability.pod \
+ guestfs-structs.pod \
guestfish-actions.pod
EXTRA_DIST = \
@@ -83,15 +84,23 @@ EXTRA_DIST = \
libguestfs.3
# Manual pages.
-# guestfs-actions.pod and guestfs-structs are autogenerated. There is
-# no include mechanism for POD, so we have to do it by hand.
+# guestfs-actions.pod, guestfs-availability.pod and guestfs-structs
+# are autogenerated. There is no include mechanism for POD, so we
+# have to do it by hand.
man_MANS = guestfs.3 libguestfs.3 guestfish.1
-guestfs.3: guestfs.pod guestfs-actions.pod guestfs-structs.pod
+guestfs.3: guestfs.pod \
+ guestfs-actions.pod \
+ guestfs-availability.pod \
+ guestfs-structs.pod
sed \
- -e '/@ACTIONS@/rguestfs-actions.pod' -e 's/@ACTIONS@//' \
- -e '/@STRUCTS@/rguestfs-structs.pod' -e 's/@STRUCTS@//' \
+ -e '/@ACTIONS@/rguestfs-actions.pod' \
+ -e 's/@ACTIONS@//' \
+ -e '/@AVAILABILITY@/rguestfs-availability.pod' \
+ -e 's/@AVAILABILITY@//' \
+ -e '/@STRUCTS@/rguestfs-structs.pod' \
+ -e 's/@STRUCTS@//' \
< $< | \
$(POD2MAN) \
--section 3 \
@@ -113,11 +122,18 @@ guestfish.1: guestfish.pod guestfish-actions.pod
noinst_DATA = html/guestfs.3.html html/guestfish.1.html
-html/guestfs.3.html: guestfs.pod guestfs-actions.pod guestfs-structs.pod
+html/guestfs.3.html: guestfs.pod \
+ guestfs-actions.pod \
+ guestfs-availability.pod \
+ guestfs-structs.pod
mkdir -p html
sed \
- -e '/@ACTIONS@/rguestfs-actions.pod' -e 's/@ACTIONS@//' \
- -e '/@STRUCTS@/rguestfs-structs.pod' -e 's/@STRUCTS@//' \
+ -e '/@ACTIONS@/rguestfs-actions.pod' \
+ -e 's/@ACTIONS@//' \
+ -e '/@AVAILABILITY@/rguestfs-availability.pod' \
+ -e 's/@AVAILABILITY@//' \
+ -e '/@STRUCTS@/rguestfs-structs.pod' \
+ -e 's/@STRUCTS@//' \
< $< | \
pod2html \
--css 'pod.css' \