From 2d9953097b6d3b71122d444a4550047e97aee009 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Fri, 20 Nov 2009 14:10:06 +0000 Subject: 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__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". --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) (limited to '.gitignore') diff --git a/.gitignore b/.gitignore index b3869c52..3348b979 100644 --- a/.gitignore +++ b/.gitignore @@ -48,6 +48,8 @@ daemon/guestfsd daemon/install-sh daemon/missing daemon/names.c +daemon/optgroups.c +daemon/optgroups.h daemon/stubs.c depcomp .deps @@ -65,6 +67,7 @@ guestfish.1 guestfish-actions.pod guestfs.3 guestfs-actions.pod +guestfs-availability.pod guestfs-structs.pod haskell/Bindtests haskell/Bindtests.hs -- cgit