avg-I commented on this pull request.
> @@ -203,6 +204,23 @@ lzc_clone(const char *fsname, const char *origin,
return (error);
}
+int
+lzc_promote(const char *fsname, const char *origin)
I have my variant of `lzc_promote` and it looks like this:
```
int
lzc_promote(const char *fsname, char *snapnamebuf, int snapnamelen)
{
zfs_cmd_t zc = { 0 };
int error;
/* XXX zc_value <- name of origin snapshot, needed for unmounting */
(void) strlcpy(zc.zc_name, fsname, sizeof (zc.zc_name));
error = ioctl(g_fd, ZFS_IOC_PROMOTE, &zc);
if (error != 0) {
error = errno;
if (snapnamebuf != NULL)
(void) strlcpy(snapnamebuf, zc.zc_string, snapnamelen);
}
return (error);
}
```
I think that we should try to make the libzfs_core interfaces as stable and
powerful as possible from the very start.
Extra stuff in them does not hurt as much as any missing things, of course.
--
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/385#discussion_r118315569
------------------------------------------
openzfs-developer
Archives:
https://openzfs.topicbox.com/groups/developer/discussions/Tb321381674e0be00-Mf5efdbd026c894e0e0c028cd
Powered by Topicbox: https://topicbox.com