aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libzutil
diff options
context:
space:
mode:
authorMatthew Ahrens <[email protected]>2020-06-10 17:07:59 -0700
committerGitHub <[email protected]>2020-06-10 17:07:59 -0700
commitf66434268cef381b2799c45c654162bfb8e128ce (patch)
treead43282f17f4f5314fad99f4da1bb2ead5211fe3 /lib/libzutil
parentfeff3f69fc3de99f31af6955e2cb27eb8d0f436e (diff)
Remove unnecessary references to slavery
The horrible effects of human slavery continue to impact society. The casual use of the term "slave" in computer software is an unnecessary reference to a painful human experience. This commit removes all possible references to the term "slave". Implementation notes: The zpool.d/slaves script is renamed to dm-deps, which uses the same terminology as `dmsetup deps`. References to the `/sys/class/block/$dev/slaves` directory remain. This directory name is determined by the Linux kernel. Although `dmsetup deps` provides the same information, it unfortunately requires elevated privileges, whereas the `/sys/...` directory is world-readable. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Matthew Ahrens <[email protected]> Closes #10435
Diffstat (limited to 'lib/libzutil')
-rw-r--r--lib/libzutil/os/linux/zutil_device_path_os.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libzutil/os/linux/zutil_device_path_os.c b/lib/libzutil/os/linux/zutil_device_path_os.c
index 3fff8c358..36331fd72 100644
--- a/lib/libzutil/os/linux/zutil_device_path_os.c
+++ b/lib/libzutil/os/linux/zutil_device_path_os.c
@@ -203,7 +203,11 @@ dm_get_underlying_path(const char *dm_name)
if (dp == NULL)
goto end;
- /* Return first sd* entry in /sys/block/dm-N/slaves/ */
+ /*
+ * Return first entry (that isn't itself a directory) in the
+ * directory containing device-mapper dependent (underlying)
+ * devices.
+ */
while ((ep = readdir(dp))) {
if (ep->d_type != DT_DIR) { /* skip "." and ".." dirs */
size = asprintf(&path, "/dev/%s", ep->d_name);