diff --git a/lib/libbe/be.c b/lib/libbe/be.c index 1a5d4378ec7..d47e444149a 100644 --- a/lib/libbe/be.c +++ b/lib/libbe/be.c @@ -696,7 +696,6 @@ be_import(libbe_handle_t *lbh, const char *bootenv, int fd) strftime(buf + len, BE_MAXPATHLEN - len, "@%F-%T", localtime(&rawtime)); - /* lzc_receive(SNAPNAME, PROPS, ORIGIN, FORCE, fd)) { */ if ((err = lzc_receive(buf, NULL, NULL, false, fd)) != 0) { switch (err) { case EINVAL: @@ -724,7 +723,8 @@ be_import(libbe_handle_t *lbh, const char *bootenv, int fd) nvlist_free(props); - return (be_destroy(lbh, nbuf, 0)); + /* XXX TODO: Figure out how to destroy the ghost... */ + return (BE_ERR_SUCCESS); } #if SOON diff --git a/lib/libbe/libbe.3 b/lib/libbe/libbe.3 index e0644666bdf..b6b1d5f7d7a 100644 --- a/lib/libbe/libbe.3 +++ b/lib/libbe/libbe.3 @@ -170,11 +170,9 @@ An error may occur if: .It libzfs fails to initialize, .It The system has not been properly booted with a ZFS boot environment, -.It -.Nm +.It Nm fails to open the zpool the active boot environment resides on, or -.It -.Nm +.It Nm fails to locate the boot environment that is currently mounted. .El .Pp @@ -422,7 +420,6 @@ exactly as specified by The .Fn be_prop_list_free function will free the property list. -.Fp .Sh DIAGNOSTICS Upon error, one of the following values will be returned. .\" TODO: make each entry on its own line. @@ -458,5 +455,9 @@ were written as a 2017 Google Summer of Code project with Allan Jude serving as a mentor. Later work was done by .An Kyle Evans Aq Mt kevans@FreeBSD.org . -.\" TODO: update when implementation complete. -.\" .Sh BUGS +.Sh BUGS +The +.Fn be_import +function does not destroy the temporary boot environment it creates for import, +because the snapshot created to do the import may not be deleted since it is the +origin of the new boot environment.