]> granicus.if.org Git - zfs/commitdiff
Illumos 5813 - zfs_setprop_error(): Handle errno value E2BIG.
authorWill Andrews <will@freebsd.org>
Mon, 6 Jul 2015 02:13:12 +0000 (04:13 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 10 Jul 2015 19:13:19 +0000 (12:13 -0700)
5813 zfs_setprop_error(): Handle errno value E2BIG.
Reviewed by: Paul Dagnelie <paul.dagnelie@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Richard Elling <richard.elling@richardelling.com>
Approved by: Garrett D'Amore <garrett@damore.org>

References:
  https://github.com/illumos/illumos-gate/commit/6fdcb3d
  https://www.illumos.org/issues/5813

Ported-by: kernelOfTruth kerneloftruth@gmail.com
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #3572

lib/libzfs/libzfs_dataset.c

index 9f23d18015284af0048e95fb5673b1869275e64f..4bb826aca9cf01c4e28d9afc9df2eece0be82961 100644 (file)
@@ -1445,6 +1445,12 @@ zfs_setprop_error(libzfs_handle_t *hdl, zfs_prop_t prop, int err,
                (void) zfs_error(hdl, EZFS_DSREADONLY, errbuf);
                break;
 
+       case E2BIG:
+               zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
+                   "property value too long"));
+               (void) zfs_error(hdl, EZFS_BADPROP, errbuf);
+               break;
+
        case ENOTSUP:
                zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
                    "pool and or dataset must be upgraded to set this "