On Wed, May 09, 2007 at 11:22:13AM +0200, Lars-Erik Bj?rk
wrote:> Hi all!
>
> I need to get some information about the zfs file system from my
> application, i.e reserved space, used space, space used by a specific
> snapshot etc.
> Until now I have forked a process and used the CLI and a pipe to receive
> the output (zfs get -H -o value -p used,reservation tank/jabbathehut).
>
> I am changing my application to use libzfs instead of the CLI. Does anyone
> know how to get this information when using libzfs? It is no problem with
> the standard operations such as create/destroy/rollback, but I
can''t seem
> to figure out how to get the file system properties. I have browsed
> through some of the source code, but no lights started flashing :)
See zfs_prop_get() as well as zfs_get_user_props(). Of course, these
functions are subject to change without notice, but I assume you know
that already ;-)
- Eric
--
Eric Schrock, Solaris Kernel Development http://blogs.sun.com/eschrock