Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Sep 2019 19:55:52 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r352721 - stable/12/cddl/contrib/opensolaris/lib/libzfs/common
Message-ID:  <201909251955.x8PJtqFD049419@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Wed Sep 25 19:55:52 2019
New Revision: 352721
URL: https://svnweb.freebsd.org/changeset/base/352721

Log:
  MFC r352590: print summary line for space estimate of zfs send from bookmark

Modified:
  stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c
==============================================================================
--- stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c	Wed Sep 25 19:52:34 2019	(r352720)
+++ stable/12/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c	Wed Sep 25 19:55:52 2019	(r352721)
@@ -2056,6 +2056,15 @@ zfs_send_one(zfs_handle_t *zhp, const char *from, int 
 		if (err == 0) {
 			send_print_verbose(fout, zhp->zfs_name, from, size,
 			    flags.parsable);
+			if (flags.parsable) {
+				(void) fprintf(fout, "size\t%llu\n",
+				    (longlong_t)size);
+			} else {
+				char buf[16];
+				zfs_nicenum(size, buf, sizeof (buf));
+				(void) fprintf(fout, dgettext(TEXT_DOMAIN,
+				    "total estimated size is %s\n"), buf);
+			}
 		} else {
 			(void) fprintf(stderr, "Cannot estimate send size: "
 			    "%s\n", strerror(errno));



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