summaryrefslogtreecommitdiff
path: root/src/tc-io.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tc-io.c')
-rw-r--r--src/tc-io.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tc-io.c b/src/tc-io.c
index 639ebcc..77baf01 100644
--- a/src/tc-io.c
+++ b/src/tc-io.c
@@ -20,7 +20,10 @@ static void sf(void)
return;
}
ssize_t ret = HX_sendfile(dst, src, SIZE_MAX);
- printf("sendfile transferred %zd bytes\n", ret);
+ if (ret < 0)
+ printf("sendfile: %s\n", strerror(errno));
+ else
+ printf("sendfile transferred %zd bytes\n", ret);
close(dst);
close(src);
}