From owner-svn-src-projects@freebsd.org Tue Aug 7 02:40:01 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 66EE5106FEB1 for ; Tue, 7 Aug 2018 02:40:01 +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 1BBA2771FC; Tue, 7 Aug 2018 02:40:01 +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 D6E5915B02; Tue, 7 Aug 2018 02:40:00 +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 w772e03J090849; Tue, 7 Aug 2018 02:40:00 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w772e0dO090848; Tue, 7 Aug 2018 02:40:00 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201808070240.w772e0dO090848@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 7 Aug 2018 02:40:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r337404 - 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: 337404 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: Tue, 07 Aug 2018 02:40:01 -0000 Author: kevans Date: Tue Aug 7 02:40:00 2018 New Revision: 337404 URL: https://svnweb.freebsd.org/changeset/base/337404 Log: libbe(3): Rename prop_list_builder and snapshot_prop_list_builder Modified: projects/bectl/lib/libbe/be_impl.h projects/bectl/lib/libbe/be_info.c Modified: projects/bectl/lib/libbe/be_impl.h ============================================================================== --- projects/bectl/lib/libbe/be_impl.h Tue Aug 7 02:32:29 2018 (r337403) +++ projects/bectl/lib/libbe/be_impl.h Tue Aug 7 02:40:00 2018 (r337404) @@ -62,7 +62,7 @@ typedef struct prop_data { } prop_data_t; int prop_list_builder_cb(zfs_handle_t *, void *); -int prop_list_builder(prop_data_t *); +int be_proplist_update(prop_data_t *); int set_error(libbe_handle_t *, be_error_t); Modified: projects/bectl/lib/libbe/be_info.c ============================================================================== --- projects/bectl/lib/libbe/be_info.c Tue Aug 7 02:32:29 2018 (r337403) +++ projects/bectl/lib/libbe/be_info.c Tue Aug 7 02:40:00 2018 (r337404) @@ -29,7 +29,7 @@ #include "be.h" #include "be_impl.h" -static int snapshot_prop_list_builder(zfs_handle_t *hdl, prop_data_t *data); +static int snapshot_proplist_update(zfs_handle_t *hdl, prop_data_t *data); /* * Returns the name of the active boot environment @@ -97,7 +97,7 @@ be_get_bootenv_props(libbe_handle_t *lbh, nvlist_t *ds data.lbh = lbh; data.list = dsnvl; data.single_object = false; - return (prop_list_builder(&data)); + return (be_proplist_update(&data)); } int @@ -133,7 +133,7 @@ be_get_dataset_snapshots(libbe_handle_t *lbh, const ch ZFS_TYPE_FILESYSTEM)) == NULL) return (BE_ERR_ZFSOPEN); - ret = snapshot_prop_list_builder(ds_hdl, &data); + ret = snapshot_proplist_update(ds_hdl, &data); zfs_close(ds_hdl); return (ret); } @@ -141,7 +141,6 @@ be_get_dataset_snapshots(libbe_handle_t *lbh, const ch /* * Internal callback function used by zfs_iter_filesystems. For each dataset in * the bootenv root, populate an nvlist_t of its relevant properties. - * TODO: should any other properties be included? */ int prop_list_builder_cb(zfs_handle_t *zfs_hdl, void *data_p) @@ -221,12 +220,11 @@ prop_list_builder_cb(zfs_handle_t *zfs_hdl, void *data /* * Updates the properties of each bootenv in the libbe handle - * XXX TODO: rename to be_proplist_update * XXX TODO: ensure that this is always consistent (run after adds, deletes, * renames,etc */ int -prop_list_builder(prop_data_t *data) +be_proplist_update(prop_data_t *data) { zfs_handle_t *root_hdl; @@ -243,7 +241,7 @@ prop_list_builder(prop_data_t *data) } static int -snapshot_prop_list_builder(zfs_handle_t *hdl, prop_data_t *data) +snapshot_proplist_update(zfs_handle_t *hdl, prop_data_t *data) { return (zfs_iter_snapshots_sorted(hdl, prop_list_builder_cb, data));