HomeFreeBSD

libzfs: const'ify path argument to zfs_path_to_zhandle

Description

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 <ryan@ixsystems.com>
Reviewed-by: Matt Ahrens <matt@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Kyle Evans <kevans@FreeBSD.org>
Closes #10605

Details

Provenance
kevansAuthored on Jul 22 2020, 6:14 PM
GitHub <noreply@github.com>Committed on Jul 22 2020, 6:14 PM
Parents
rGdb5b3926e98e: OpenZFSify CONTRIBUTING.md
Branches
Unknown
Tags
Unknown