mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 01:51:00 +03:00
Don't bomb out when using keylocation=file://
Avoid following the error path when the operation in fact succeeded. Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: James Wah <james@laird-wah.net> Closes #11651
This commit is contained in:
parent
e439ee83c1
commit
92fb29b9f9
@ -532,6 +532,8 @@ get_key_material(libzfs_handle_t *hdl, boolean_t do_verify, boolean_t newkey,
|
||||
|
||||
break;
|
||||
case ZFS_KEYLOCATION_URI:
|
||||
ret = ENOTSUP;
|
||||
|
||||
for (handler = uri_handlers; handler->zuh_scheme != NULL;
|
||||
handler++) {
|
||||
if (strcmp(handler->zuh_scheme, uri_scheme) != 0)
|
||||
@ -544,9 +546,11 @@ get_key_material(libzfs_handle_t *hdl, boolean_t do_verify, boolean_t newkey,
|
||||
break;
|
||||
}
|
||||
|
||||
ret = ENOTSUP;
|
||||
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
|
||||
"URI scheme is not supported"));
|
||||
if (ret == ENOTSUP) {
|
||||
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
|
||||
"URI scheme is not supported"));
|
||||
goto error;
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user