From feb46b92a7619a3bb67b925e24184fe70464d261 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 16 Dec 2010 15:47:40 -0800 Subject: Open up libzfs_run_process/libzfs_load_module Recently helper functions were added to libzfs_util to load a kernel module or execute a process. Initially this functionality was limited to libzfs but it has become clear there will be other consumers. This change opens up the interface so it may be used where appropriate. --- include/libzfs.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/libzfs.h b/include/libzfs.h index 6752579e8..082b690e9 100644 --- a/include/libzfs.h +++ b/include/libzfs.h @@ -672,6 +672,12 @@ extern int zfs_deleg_share_nfs(libzfs_handle_t *, char *, char *, char *, extern void zfs_nicenum(uint64_t, char *, size_t); extern int zfs_nicestrtonum(libzfs_handle_t *, const char *, uint64_t *); +/* + * Utility functions to run an external process. + */ +int libzfs_run_process(const char *, char **); +int libzfs_load_module(const char *); + /* * Given a device or file, determine if it is part of a pool. */ -- cgit v1.2.3