Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Aug 2018 03:26:32 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r337408 - projects/bectl/lib/libbe
Message-ID:  <201808070326.w773QWRk018049@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Tue Aug  7 03:26:32 2018
New Revision: 337408
URL: https://svnweb.freebsd.org/changeset/base/337408

Log:
  libbe(3): Document that we'll clobber previous errors set by set_error

Modified:
  projects/bectl/lib/libbe/be_error.c
  projects/bectl/lib/libbe/be_impl.h

Modified: projects/bectl/lib/libbe/be_error.c
==============================================================================
--- projects/bectl/lib/libbe/be_error.c	Tue Aug  7 03:25:28 2018	(r337407)
+++ projects/bectl/lib/libbe/be_error.c	Tue Aug  7 03:26:32 2018	(r337408)
@@ -107,7 +107,6 @@ int
 set_error(libbe_handle_t *lbh, be_error_t err)
 {
 
-	/* XXX TODO: should the old error be overwritten or no? */
 	lbh->error = err;
 	if (lbh->print_on_err && (err != BE_ERR_SUCCESS))
 		fprintf(stderr, "%s\n", libbe_error_description(lbh));

Modified: projects/bectl/lib/libbe/be_impl.h
==============================================================================
--- projects/bectl/lib/libbe/be_impl.h	Tue Aug  7 03:25:28 2018	(r337407)
+++ projects/bectl/lib/libbe/be_impl.h	Tue Aug  7 03:26:32 2018	(r337408)
@@ -64,6 +64,7 @@ typedef struct prop_data {
 int prop_list_builder_cb(zfs_handle_t *, void *);
 int be_proplist_update(prop_data_t *);
 
+/* Clobbers any previous errors */
 int set_error(libbe_handle_t *, be_error_t);
 
 #endif  /* _LIBBE_IMPL_H */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808070326.w773QWRk018049>