[syslinux] can't get write_sectors to work...

Pierre-Alexandre Meyer pierre at mouraf.org
Mon Sep 20 06:27:44 PDT 2010


On Sun, Sep 19, 2010 at 9:23 PM, Robert Jordan <rjordan at notampering.com>wrote:

> Thanks for the patch Pierre.  Unfortunately it doesn't seem to have changed
> the behavior at all.  If you have any other ideas let me know.


Sorry, I've sent you a half-cooked patch:

diff --git a/com32/gpllib/disk/write.c b/com32/gpllib/disk/write.c
index 89e530d..b1b12e0 100644
--- a/com32/gpllib/disk/write.c
+++ b/com32/gpllib/disk/write.c
@@ -37,9 +37,9 @@ int write_sectors(const struct driveinfo *drive_info,
const unsigned int lba,
 {
     com32sys_t inreg, outreg;
     struct ebios_dapa *dapa = __com32.cs_bounce;
-    void *buf = (char *)__com32.cs_bounce + size;
+    void *buf = (char *)__com32.cs_bounce + SECTOR * size;

-    memcpy(buf, data, size);
+    memcpy(buf, data, SECTOR * size);
     memset(&inreg, 0, sizeof inreg);

     if (drive_info->ebios) {
@@ -97,7 +97,7 @@ int write_sectors(const struct driveinfo *drive_info,
const unsigned int lba,
 int write_verify_sector(struct driveinfo *drive_info,
                        const unsigned int lba, const void *data)
 {
-    return write_verify_sectors(drive_info, lba, data, SECTOR);
+    return write_verify_sectors(drive_info, lba, data, 1);
 }

 /**



> Meanwhile I'll see if I can figure anything out on my own.
>

I'll try to reproduce it here as well.

Thanks,

-- 
Pierre-Alexandre Meyer
http://pub.mouraf.org/blog



More information about the Syslinux mailing list