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
This commit is contained in:
parent
f33533da8c
commit
62dd1037a9
@ -2054,6 +2054,15 @@ zfs_send_one(zfs_handle_t *zhp, const char *from, int fd, sendflags_t flags)
|
||||
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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user