[Libguestfs] [PATCH] NEW API: add a new api restorecon
Richard W.M. Jones
rjones at redhat.com
Wed Oct 24 09:41:59 UTC 2012
On Wed, Oct 24, 2012 at 05:28:16PM +0800, Wanlong Gao wrote:
>
> >> +}
> >> diff --git a/generator/actions.ml b/generator/actions.ml
> >> index 71aee37..12796a7 100644
> >> --- a/generator/actions.ml
> >> +++ b/generator/actions.ml
> >> @@ -10241,6 +10241,31 @@ If the optional C<suffix> parameter is given, then the suffix
> >>
> >> See also: C<guestfs_mkdtemp>." };
> >>
> >> + { defaults with
> >> + name = "restorecon";
> >> + style = RErr, [Pathname "pathname"], [OString "excludedir"; OString "labelprefix"; OBool "recursion"; OBool "force"];
> >> + proc_nr = Some 374;
> >> + tests = [
> >> + InitScratchFS, Always, TestRun (
> >
> > This test shouldn't be 'Always'. It should be conditional on having
> > selinux.
>
> Do you mean "IfAvailable of HAVE_LIBSELINUX" here?
https://github.com/libguestfs/libguestfs/blob/master/generator/types.ml#L291
However "HAVE_LIBSELINUX" isn't going to work. You need to use the
right option group from this list:
http://libguestfs.org/guestfs.3.html#groups-of-functionality-in-the-appliance
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages. http://libguestfs.org
More information about the Libguestfs
mailing list