Skip to content

Commit

Permalink
Upstream: import -d does not go through os/macos/ sources
Browse files Browse the repository at this point in the history
On macOS we need to prioritise /dev/disk over /dev/rdisk, but
the common code makes no adjustment based on os preferred names.

Potentially we should possibly call an os/ function to set
the priority.

Signed-off-by: Jorgen Lundman <[email protected]>
  • Loading branch information
lundman committed Jun 22, 2021
1 parent 490ff77 commit 7d0b6a5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/libzutil/zutil_import.c
Original file line number Diff line number Diff line change
Expand Up @@ -1217,6 +1217,12 @@ zpool_find_import_scan_add_slice(libpc_handle_t *hdl, pthread_mutex_t *lock,
slice->rn_lock = lock;
slice->rn_avl = cache;
slice->rn_hdl = hdl;
#ifdef __APPLE__
/* Prefer diskX over rdiskX: involve os/ somehow? */
if (name[0] == 'r')
slice->rn_order = order + IMPORT_ORDER_DEFAULT;
else
#endif
slice->rn_order = order + IMPORT_ORDER_SCAN_OFFSET;
slice->rn_labelpaths = B_FALSE;

Expand Down

0 comments on commit 7d0b6a5

Please sign in to comment.