mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Fix error message on promoting encrypted dataset
This patch corrects the error message reported when attempting to promote a dataset outside of its encryption root. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Tom Caputi <tcaputi@datto.com> Closes #8905 Closes #8935
This commit is contained in:
@@ -4117,6 +4117,16 @@ zfs_promote(zfs_handle_t *zhp)
|
||||
|
||||
if (ret != 0) {
|
||||
switch (ret) {
|
||||
case EACCES:
|
||||
/*
|
||||
* Promoting encrypted dataset outside its
|
||||
* encryption root.
|
||||
*/
|
||||
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
|
||||
"cannot promote dataset outside its "
|
||||
"encryption root"));
|
||||
return (zfs_error(hdl, EZFS_EXISTS, errbuf));
|
||||
|
||||
case EEXIST:
|
||||
/* There is a conflicting snapshot name. */
|
||||
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
|
||||
|
||||
Reference in New Issue
Block a user