From 596ba08220ad7c58534c4296707ce9c93730e5d8 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Sun, 28 Feb 2010 20:19:44 +0000 Subject: [PATCH] Well, it was a 50-50 chance to hit the portable write function... Should fix the anyboot build tool build on non-Haiku. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35673 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/tools/anyboot/anyboot.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tools/anyboot/anyboot.cpp b/src/tools/anyboot/anyboot.cpp index aa1931be47..d100d914d5 100644 --- a/src/tools/anyboot/anyboot.cpp +++ b/src/tools/anyboot/anyboot.cpp @@ -18,7 +18,7 @@ copyLoop(int from, int to, off_t position) if (copyLength <= 0) return copyLength; - ssize_t written = write_pos(to, position, sCopyBuffer, copyLength); + ssize_t written = pwrite(to, sCopyBuffer, copyLength, position); if (written != copyLength) { if (written < 0) return written; @@ -110,12 +110,12 @@ main(int argc, char *argv[]) uint32_t partitionOffset = (uint32_t)(imageOffset / kBlockSize); ((uint32_t *)partition)[2] = partitionOffset; ((uint32_t *)partition)[3] = (uint32_t)(imageSize / kBlockSize); - ssize_t written = write_pos(outputFile, 512 - 2 - 16 * 4, partition, 16); + ssize_t written = pwrite(outputFile, partition, 16, 512 - 2 - 16 * 4); checkError(written != 16, "failed to write partition entry"); // and make the image bootable - written = write_pos(outputFile, imageOffset + 512 - 2 - 4, - &partitionOffset, 4); + written = pwrite(outputFile, &partitionOffset, 4, + imageOffset + 512 - 2 - 4); checkError(written != 4, "failed to make image bootable"); free(sCopyBuffer);