summaryrefslogtreecommitdiffstats
path: root/usr.sbin/burncd
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2005-05-13 20:06:44 +0000
committerru <ru@FreeBSD.org>2005-05-13 20:06:44 +0000
commit0216f48e12457eeb1b3ee06607295d9d1830b190 (patch)
treee33cc276ea6edc6b64a2c8183f87dcb9ae3a2cfa /usr.sbin/burncd
parent861ed0532c581886df16f8004e3afbff0319a636 (diff)
downloadFreeBSD-src-0216f48e12457eeb1b3ee06607295d9d1830b190.zip
FreeBSD-src-0216f48e12457eeb1b3ee06607295d9d1830b190.tar.gz
Fix the "only wrote -1 of 32768 bytes: Input/output error" error message.
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