diff options
author | Kyle Evans <[email protected]> | 2020-07-22 13:14:20 -0500 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-22 11:14:20 -0700 |
commit | b197457cd6e7deec0a24dcd435de5c4184399348 (patch) | |
tree | 3497e88c4805c335f066aa6ce40f08ea9b76797d /include/libzfs.h | |
parent | db5b3926e98e6b6a29da0987c78c59f4502ff22c (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 'include/libzfs.h')
-rw-r--r-- | include/libzfs.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/libzfs.h b/include/libzfs.h index 6f797c0a3..b405ad1e1 100644 --- a/include/libzfs.h +++ b/include/libzfs.h @@ -789,7 +789,8 @@ extern int zfs_show_diffs(zfs_handle_t *, int, const char *, const char *, extern const char *zfs_type_to_name(zfs_type_t); extern void zfs_refresh_properties(zfs_handle_t *); extern int zfs_name_valid(const char *, zfs_type_t); -extern zfs_handle_t *zfs_path_to_zhandle(libzfs_handle_t *, char *, zfs_type_t); +extern zfs_handle_t *zfs_path_to_zhandle(libzfs_handle_t *, const char *, + zfs_type_t); extern int zfs_parent_name(zfs_handle_t *, char *, size_t); extern boolean_t zfs_dataset_exists(libzfs_handle_t *, const char *, zfs_type_t); |