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 <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@ixsystems.com>
Closes #9565
This commit is contained in:
Ryan Moeller
2019-11-11 15:15:44 -05:00
committed by Brian Behlendorf
parent 5a6ac4cffc
commit 035ebb3653
3 changed files with 85 additions and 77 deletions
+1 -1
View File
@@ -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);