libzfs_sendrecv: Style pass on zfs_send_space
* Reduce indentation. * Move locals closer to use. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ryan Moeller <freqlabs@FreeBSD.org> Closes #12967
This commit is contained in:
parent
0c1c746a74
commit
a8747c0403
|
@ -726,17 +726,17 @@ static int
|
||||||
zfs_send_space(zfs_handle_t *zhp, const char *snapname, const char *from,
|
zfs_send_space(zfs_handle_t *zhp, const char *snapname, const char *from,
|
||||||
enum lzc_send_flags flags, uint64_t *spacep)
|
enum lzc_send_flags flags, uint64_t *spacep)
|
||||||
{
|
{
|
||||||
libzfs_handle_t *hdl = zhp->zfs_hdl;
|
|
||||||
int error;
|
|
||||||
|
|
||||||
assert(snapname != NULL);
|
assert(snapname != NULL);
|
||||||
error = lzc_send_space(snapname, from, flags, spacep);
|
|
||||||
|
|
||||||
if (error != 0) {
|
int error = lzc_send_space(snapname, from, flags, spacep);
|
||||||
|
if (error == 0)
|
||||||
|
return (0);
|
||||||
|
|
||||||
char errbuf[1024];
|
char errbuf[1024];
|
||||||
(void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN,
|
(void) snprintf(errbuf, sizeof (errbuf), dgettext(TEXT_DOMAIN,
|
||||||
"warning: cannot estimate space for '%s'"), snapname);
|
"warning: cannot estimate space for '%s'"), snapname);
|
||||||
|
|
||||||
|
libzfs_handle_t *hdl = zhp->zfs_hdl;
|
||||||
switch (error) {
|
switch (error) {
|
||||||
case EXDEV:
|
case EXDEV:
|
||||||
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
|
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
|
||||||
|
@ -772,9 +772,6 @@ zfs_send_space(zfs_handle_t *zhp, const char *snapname, const char *from,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Dumps a backup of the given snapshot (incremental from fromsnap if it's not
|
* Dumps a backup of the given snapshot (incremental from fromsnap if it's not
|
||||||
* NULL) to the file descriptor specified by outfd.
|
* NULL) to the file descriptor specified by outfd.
|
||||||
|
|
Loading…
Reference in New Issue