From 035ebb365383dcca71c4c542093ea1ad2b8e1dea Mon Sep 17 00:00:00 2001 From: Ryan Moeller Date: Mon, 11 Nov 2019 15:15:44 -0500 Subject: Allow platform dependent path stripping for vdevs On Linux the full path preceding devices is stripped when formatting vdev names. On FreeBSD we only want to strip "/dev/". Hide the implementation details of path stripping behind zfs_strip_path(). Make zfs_strip_partition_path() static in Linux implementation while here, since it is never used outside of the file it is defined in. Reviewed-by: Brian Behlendorf Signed-off-by: Ryan Moeller Closes #9565 --- include/libzutil.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/libzutil.h') diff --git a/include/libzutil.h b/include/libzutil.h index e453e4feb..93aac5f3c 100644 --- a/include/libzutil.h +++ b/include/libzutil.h @@ -97,7 +97,7 @@ extern int zfs_append_partition(char *path, size_t max_len); extern int zfs_resolve_shortname(const char *name, char *path, size_t pathlen); extern char *zfs_strip_partition(char *); -extern char *zfs_strip_partition_path(char *); +extern char *zfs_strip_path(char *); extern int zfs_strcmp_pathname(const char *, const char *, int); -- cgit v1.2.3