From owner-svn-src-projects@freebsd.org Sat Aug 11 04:09:43 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4582D105D0CE for ; Sat, 11 Aug 2018 04:09:43 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DFA658A73F; Sat, 11 Aug 2018 04:09:42 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B10EA11F21; Sat, 11 Aug 2018 04:09:42 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7B49gQb033242; Sat, 11 Aug 2018 04:09:42 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7B49grw033241; Sat, 11 Aug 2018 04:09:42 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201808110409.w7B49grw033241@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sat, 11 Aug 2018 04:09:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r337605 - projects/bectl/lib/libbe X-SVN-Group: projects X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: projects/bectl/lib/libbe X-SVN-Commit-Revision: 337605 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Aug 2018 04:09:43 -0000 Author: kevans Date: Sat Aug 11 04:09:42 2018 New Revision: 337605 URL: https://svnweb.freebsd.org/changeset/base/337605 Log: libbe(3): Document the import bug... Modified: projects/bectl/lib/libbe/be.c projects/bectl/lib/libbe/libbe.3 Modified: projects/bectl/lib/libbe/be.c ============================================================================== --- projects/bectl/lib/libbe/be.c Sat Aug 11 04:07:00 2018 (r337604) +++ projects/bectl/lib/libbe/be.c Sat Aug 11 04:09:42 2018 (r337605) @@ -696,7 +696,6 @@ be_import(libbe_handle_t *lbh, const char *bootenv, in 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, in nvlist_free(props); - return (be_destroy(lbh, nbuf, 0)); + /* XXX TODO: Figure out how to destroy the ghost... */ + return (BE_ERR_SUCCESS); } #if SOON Modified: projects/bectl/lib/libbe/libbe.3 ============================================================================== --- projects/bectl/lib/libbe/libbe.3 Sat Aug 11 04:07:00 2018 (r337604) +++ projects/bectl/lib/libbe/libbe.3 Sat Aug 11 04:09:42 2018 (r337605) @@ -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 w 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.