danmcd commented on this pull request.


>               zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
                    "not a cloned filesystem"));
                return (zfs_error(hdl, EZFS_BADTYPE, errbuf));
        }
 
-       (void) strlcpy(zc.zc_value, zhp->zfs_dmustats.dds_origin,
-           sizeof (zc.zc_value));
-       (void) strlcpy(zc.zc_name, zhp->zfs_name, sizeof (zc.zc_name));
-       ret = zfs_ioctl(hdl, ZFS_IOC_PROMOTE, &zc);
+       ret = lzc_promote(zhp->zfs_name, snapname, sizeof(snapname));
 
        if (ret != 0) {
                int save_errno = errno;

Seems cleaner.  I'd like @ahrens to say he's cool with it, however.  (Then 
@prakashsurya should re-ping Advocates.)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/389#discussion_r120904738
------------------------------------------
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T3d8522d1a7ad5f47-M1845f26be7c16ae32b3043b8
Powered by Topicbox: https://topicbox.com

Reply via email to