summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmd/zinject/translate.c2
-rw-r--r--lib/libzfs/libzfs_pool.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/cmd/zinject/translate.c b/cmd/zinject/translate.c
index b2ccb673a..5cc9d9fdc 100644
--- a/cmd/zinject/translate.c
+++ b/cmd/zinject/translate.c
@@ -467,7 +467,7 @@ translate_device(const char *pool, const char *device, err_type_t label_type,
if ((zhp = zpool_open(g_zfs, pool)) == NULL)
return (-1);
- record->zi_guid = strtoull(device, &end, 16);
+ record->zi_guid = strtoull(device, &end, 0);
if (record->zi_guid == 0 || *end != '\0') {
tgt = zpool_find_vdev(zhp, device, &isspare, &iscache, NULL);
diff --git a/lib/libzfs/libzfs_pool.c b/lib/libzfs/libzfs_pool.c
index db1f0d7cf..b1ddd983d 100644
--- a/lib/libzfs/libzfs_pool.c
+++ b/lib/libzfs/libzfs_pool.c
@@ -2167,7 +2167,7 @@ zpool_find_vdev(zpool_handle_t *zhp, const char *path, boolean_t *avail_spare,
verify(nvlist_alloc(&search, NV_UNIQUE_NAME, KM_SLEEP) == 0);
- guid = strtoull(path, &end, 10);
+ guid = strtoull(path, &end, 0);
if (guid != 0 && *end == '\0') {
verify(nvlist_add_uint64(search, ZPOOL_CONFIG_GUID, guid) == 0);
} else if (zpool_vdev_is_interior(path)) {