Skip to content

Commit

Permalink
Merge pull request openzfs#47 from truenas/fix-zfsd
Browse files Browse the repository at this point in the history
FreeBSD: Fix zfsd auto online
  • Loading branch information
Ryan Moeller authored Feb 25, 2022
2 parents 676ac05 + 31158fd commit 912ee0c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/libzfs/libzfs_pool.c
Original file line number Diff line number Diff line change
Expand Up @@ -3072,11 +3072,15 @@ zpool_vdev_online(zpool_handle_t *zhp, const char *path, int flags,
}

if (wholedisk) {
#ifdef __FreeBSD__
const char *fullpath = pathname;
#else
const char *fullpath = path;
#endif
char buf[MAXPATHLEN];

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

0 comments on commit 912ee0c

Please sign in to comment.