I'm looking at writing something that will allow me to work with ZFS programmatically. I don't what to execute and parse text output of commands via scripts. I'm doing some research into using libzfs_core:
Documentation on it severely lacks. I figured I might try to understand it by looking at the source code and the python binding (pyzfs) that's already making use of it.
While trying to make sense of it I stumbled upon the weird case that libzfs_core doesn't have a function to do a "list" operation (like
However I don't see where that function is defined in libzfs_core.
zfs/lib/libzfs_core at master · openzfs/zfs
OpenZFS on Linux and FreeBSD. Contribute to openzfs/zfs development by creating an account on GitHub.
github.com
Documentation on it severely lacks. I figured I might try to understand it by looking at the source code and the python binding (pyzfs) that's already making use of it.
While trying to make sense of it I stumbled upon the weird case that libzfs_core doesn't have a function to do a "list" operation (like
zfs list
for example). Yet, pyzfs has this functionality, and it appears to call a C function named lzc_list. zfs/contrib/pyzfs/libzfs_core/bindings/libzfs_core.py at master · openzfs/zfs
OpenZFS on Linux and FreeBSD. Contribute to openzfs/zfs development by creating an account on GitHub.
github.com
However I don't see where that function is defined in libzfs_core.