diff options
author | Ruslan Ermilov <ru@FreeBSD.org> | 2005-05-13 20:06:44 +0000 |
---|---|---|
committer | Ruslan Ermilov <ru@FreeBSD.org> | 2005-05-13 20:06:44 +0000 |
commit | de6a1361a5d5f8d79402071ccd28948e041f3ee4 (patch) | |
tree | e33cc276ea6edc6b64a2c8183f87dcb9ae3a2cfa /usr.sbin/burncd/burncd.c | |
parent | fdace17f81a53a511db862fae5f4a0998a6e6fb1 (diff) |
Fix the "only wrote -1 of 32768 bytes: Input/output error" error message.
Notes
Notes:
svn path=/head/; revision=146195
Diffstat (limited to 'usr.sbin/burncd/burncd.c')
-rw-r--r-- | usr.sbin/burncd/burncd.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/burncd/burncd.c b/usr.sbin/burncd/burncd.c index aaf0b06f3990..2800f5236be5 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; |