Author: avg
Date: Sun Sep 22 08:34:23 2019
New Revision: 352590
URL: https://svnweb.freebsd.org/changeset/base/352590

Log:
  print summary line for space estimate of zfs send from bookmark
  
  Although there is always a single stream and the total size in the
  summary is always equal to the size reported for the stream, it's nice
  to follow the usual output format.
  
  MFC after:    3 days

Modified:
  head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c

Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c
==============================================================================
--- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c   Sun Sep 
22 05:16:10 2019        (r352589)
+++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c   Sun Sep 
22 08:34:23 2019        (r352590)
@@ -2054,6 +2054,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));
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to