Skip to content

Commit

Permalink
libzfs: Use the correct path variable
Browse files Browse the repository at this point in the history
path may be a guid, while pathname is what we just pulled from the
config and don't use anywhere else.
  • Loading branch information
Ryan Moeller authored and Ryan Moeller committed May 25, 2021
1 parent 429f2ab commit 9a9304a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/libzfs/libzfs_pool.c
Original file line number Diff line number Diff line change
Expand Up @@ -2940,11 +2940,11 @@ zpool_vdev_online(zpool_handle_t *zhp, const char *path, int flags,
}

if (wholedisk) {
const char *fullpath = path;
const char *fullpath = pathname;
char buf[MAXPATHLEN];

if (path[0] != '/') {
error = zfs_resolve_shortname(path, buf,
if (pathname[0] != '/') {
error = zfs_resolve_shortname(pathname, buf,
sizeof (buf));
if (error != 0)
return (zfs_error(hdl, EZFS_NODEVICE,
Expand Down

0 comments on commit 9a9304a

Please sign in to comment.