aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libzfs/libzfs_util.c
diff options
context:
space:
mode:
authorKyle Evans <[email protected]>2020-07-22 13:14:20 -0500
committerGitHub <[email protected]>2020-07-22 11:14:20 -0700
commitb197457cd6e7deec0a24dcd435de5c4184399348 (patch)
tree3497e88c4805c335f066aa6ce40f08ea9b76797d /lib/libzfs/libzfs_util.c
parentdb5b3926e98e6b6a29da0987c78c59f4502ff22c (diff)
libzfs: const'ify path argument to zfs_path_to_zhandle
zfs_path_to_zhandle has no need to mutate the path argument, most notably: - zfs_open takes path as const - getextmntent takes path as const - fprintf most clearly doesn't need to mutate it It's hard to foresee any reason that libzfs could conceivably want to mutate it in the future, either, so const'ify it. Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: Matt Ahrens <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Kyle Evans <[email protected]> Closes #10605
Diffstat (limited to 'lib/libzfs/libzfs_util.c')
-rw-r--r--lib/libzfs/libzfs_util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libzfs/libzfs_util.c b/lib/libzfs/libzfs_util.c
index 1fd9d400d..65e126844 100644
--- a/lib/libzfs/libzfs_util.c
+++ b/lib/libzfs/libzfs_util.c
@@ -1104,7 +1104,7 @@ zfs_get_pool_handle(const zfs_handle_t *zhp)
* fs/vol/snap/bkmark name.
*/
zfs_handle_t *
-zfs_path_to_zhandle(libzfs_handle_t *hdl, char *path, zfs_type_t argtype)
+zfs_path_to_zhandle(libzfs_handle_t *hdl, const char *path, zfs_type_t argtype)
{
struct stat64 statbuf;
struct extmnttab entry;