summaryrefslogtreecommitdiffstats
path: root/usr.bin/mkimg/pc98.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/mkimg/pc98.c')
-rw-r--r--usr.bin/mkimg/pc98.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/usr.bin/mkimg/pc98.c b/usr.bin/mkimg/pc98.c
index bce6c3c..7eb0a8e 100644
--- a/usr.bin/mkimg/pc98.c
+++ b/usr.bin/mkimg/pc98.c
@@ -106,11 +106,7 @@ pc98_write(int fd, lba_t imgsz __unused, void *bootcode)
if (part->label != NULL)
memcpy(dp->dp_name, part->label, strlen(part->label));
}
- error = mkimg_seek(fd, 0);
- if (error == 0) {
- if (write(fd, buf, PC98_BOOTCODESZ) != PC98_BOOTCODESZ)
- error = errno;
- }
+ error = mkimg_write(fd, 0, buf, PC98_BOOTCODESZ / secsz);
free(buf);
return (error);
}
OpenPOWER on IntegriCloud