libzfs_sendrecv: Style pass on send_print_verbose
* Add missing dgettext calls. * Avoid unnecessary line wraps. * Factor out duplicated parsable check. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ryan Moeller <freqlabs@FreeBSD.org> Closes #12967
This commit is contained in:
parent
34c8d4d4fd
commit
85c6fd4058
|
@ -981,40 +981,34 @@ send_print_verbose(FILE *fout, const char *tosnap, const char *fromsnap,
|
||||||
{
|
{
|
||||||
if (parsable) {
|
if (parsable) {
|
||||||
if (fromsnap != NULL) {
|
if (fromsnap != NULL) {
|
||||||
(void) fprintf(fout, "incremental\t%s\t%s",
|
(void) fprintf(fout, dgettext(TEXT_DOMAIN,
|
||||||
fromsnap, tosnap);
|
"incremental\t%s\t%s"), fromsnap, tosnap);
|
||||||
} else {
|
} else {
|
||||||
(void) fprintf(fout, "full\t%s",
|
(void) fprintf(fout, dgettext(TEXT_DOMAIN,
|
||||||
tosnap);
|
"full\t%s"), tosnap);
|
||||||
}
|
}
|
||||||
|
(void) fprintf(fout, "\t%llu", (longlong_t)size);
|
||||||
} else {
|
} else {
|
||||||
if (fromsnap != NULL) {
|
if (fromsnap != NULL) {
|
||||||
if (strchr(fromsnap, '@') == NULL &&
|
if (strchr(fromsnap, '@') == NULL &&
|
||||||
strchr(fromsnap, '#') == NULL) {
|
strchr(fromsnap, '#') == NULL) {
|
||||||
(void) fprintf(fout, dgettext(TEXT_DOMAIN,
|
(void) fprintf(fout, dgettext(TEXT_DOMAIN,
|
||||||
"send from @%s to %s"),
|
"send from @%s to %s"), fromsnap, tosnap);
|
||||||
fromsnap, tosnap);
|
|
||||||
} else {
|
} else {
|
||||||
(void) fprintf(fout, dgettext(TEXT_DOMAIN,
|
(void) fprintf(fout, dgettext(TEXT_DOMAIN,
|
||||||
"send from %s to %s"),
|
"send from %s to %s"), fromsnap, tosnap);
|
||||||
fromsnap, tosnap);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
(void) fprintf(fout, dgettext(TEXT_DOMAIN,
|
(void) fprintf(fout, dgettext(TEXT_DOMAIN,
|
||||||
"full send of %s"),
|
"full send of %s"), tosnap);
|
||||||
tosnap);
|
|
||||||
}
|
}
|
||||||
}
|
if (size != 0) {
|
||||||
|
|
||||||
if (parsable) {
|
|
||||||
(void) fprintf(fout, "\t%llu",
|
|
||||||
(longlong_t)size);
|
|
||||||
} else if (size != 0) {
|
|
||||||
char buf[16];
|
char buf[16];
|
||||||
zfs_nicebytes(size, buf, sizeof (buf));
|
zfs_nicebytes(size, buf, sizeof (buf));
|
||||||
(void) fprintf(fout, dgettext(TEXT_DOMAIN,
|
(void) fprintf(fout, dgettext(TEXT_DOMAIN,
|
||||||
" estimated size is %s"), buf);
|
" estimated size is %s"), buf);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
(void) fprintf(fout, "\n");
|
(void) fprintf(fout, "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue