summaryrefslogtreecommitdiffstats
path: root/usr.sbin/burncd
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/burncd')
-rw-r--r--usr.sbin/burncd/burncd.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/burncd/burncd.c b/usr.sbin/burncd/burncd.c
index aaf0b06..2800f52 100644
--- a/usr.sbin/burncd/burncd.c
+++ b/usr.sbin/burncd/burncd.c
@@ -630,8 +630,11 @@ write_file(int fd, struct track_info *track_info)
track_info->block_size;
}
if ((res = write(fd, buf, count)) != count) {
- fprintf(stderr, "\nonly wrote %d of %jd bytes: %s\n",
- res, (intmax_t)count, strerror(errno));
+ if (res == -1)
+ fprintf(stderr, "\n%s\n", strerror(errno));
+ else
+ fprintf(stderr, "\nonly wrote %d of %jd"
+ " bytes\n", res, (intmax_t)count);
break;
}
size += count;
OpenPOWER on IntegriCloud