char dirs[6][9] = {"by-id", "by-label", "by-path", "by-uuid", "zpool",
"by-vdev"};
+ /* /dev/ */
(void) snprintf(path, pathlen, "%s/%s", DISK_ROOT, name);
err = access(path, F_OK);
+ if (err == 0)
+ return (err);
+
+ /* /dev/mapper/ */
+ (void) snprintf(path, pathlen, "%s/mapper/%s", DISK_ROOT, name);
+ err = access(path, F_OK);
+ if (err == 0)
+ return (err);
+
+ /* /dev/disk/<dirs>/ */
for (i = 0; i < 6 && err < 0; i++) {
(void) snprintf(path, pathlen, "%s/%s/%s",
UDISK_ROOT, dirs[i], name);
err = access(path, F_OK);
}
- return err;
+
+ return (err);
}
/*