[Libguestfs] [PATCH 2/3] added icat API to retrieve deleted or inaccessible files

Richard W.M. Jones rjones at redhat.com
Mon Mar 7 20:10:38 UTC 2016


On Mon, Mar 07, 2016 at 09:55:24PM +0200, noxdafox wrote:
> On 07/03/16 21:45, Richard W.M. Jones wrote:
> >Thanks, I have pushed this patch series.
> >
> >Could you consider changing:
> >
> >>+    optional = Some "icat";
> >I think it would be nice to have a single feature, and to call the
> >feature "sleuthkit" or "forensics" or something like that.  We don't
> >need to have one feature per API since installation of a single
> >package (sleuthkit) is sufficient to make all the APIs available.
> This was something I was a bit confused about.
> For what I've got, libguestfs checks the availability of something
> by inspecting its path.

Correct, but ...

> TSK is a collection of tools (icat, fls, mmls, blkls...) therefore I
> was using `icat` to test its presence within the appliance.
> How could I do it better?

Just check for 'icat' (or any other utility from TSK), and call the
optgroup "sleuthkit" or "forensics" or whatever.  Since on the major
distributions, installing a single package installs all the utilities,
it'll work fine.

> Shall I call it `optional = Some "sleuthkit"` and then in the code
> check for "icat" instead of using the given parameter? Is this
> considered a "clean" solution?

Yup.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v




More information about the Libguestfs mailing list