[haiku-commits] r35673 - haiku/trunk/src/tools/anyboot

  • From: mmlr@xxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 28 Feb 2010 21:19:44 +0100 (CET)

Author: mmlr
Date: 2010-02-28 21:19:44 +0100 (Sun, 28 Feb 2010)
New Revision: 35673
Changeset: http://dev.haiku-os.org/changeset/35673/haiku

Modified:
   haiku/trunk/src/tools/anyboot/anyboot.cpp
Log:
Well, it was a 50-50 chance to hit the portable write function... Should fix
the anyboot build tool build on non-Haiku.


Modified: haiku/trunk/src/tools/anyboot/anyboot.cpp
===================================================================
--- haiku/trunk/src/tools/anyboot/anyboot.cpp   2010-02-28 19:59:48 UTC (rev 
35672)
+++ haiku/trunk/src/tools/anyboot/anyboot.cpp   2010-02-28 20:19:44 UTC (rev 
35673)
@@ -18,7 +18,7 @@
                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 @@
        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);


Other related posts: