On Fri, 30 Mar 2007 12:41:11 +0200
Johannes Berg <[EMAIL PROTECTED]> wrote:

> On Fri, 2007-03-30 at 11:27 +0200, Tim Dijkstra wrote:
> > On Sat, 24 Mar 2007 21:16:52 +0100
> > Tim Dijkstra <[EMAIL PROTECTED]> wrote:
> > 
> > We're trying to debug s2disk/s2both on somebody else his powerpc, there
> > we had to fix something even before he could write the image to disk,
> > that got me puzzled a bit... Is your machine maybe 64bit or so?
> 
> No, just 32-bit. What did you have to fix? Maybe I fixed it
> unintentionally when fixing a few compilation errors?
> 

Basically this:

Index: suspend.c
===================================================================
RCS file: /cvsroot/suspend/suspend/suspend.c,v
retrieving revision 1.70
diff -u -r1.70 suspend.c
--- suspend.c   16 Mar 2007 16:02:22 -0000      1.70
+++ suspend.c   29 Mar 2007 19:42:43 -0000
@@ -207,8 +207,13 @@
        swap.dev = blkdev;
        swap.offset = offset;
        error = ioctl(dev, SNAPSHOT_SET_SWAP_AREA, &swap);
+       /* We cast blkdev to `unsigned long' here because dev_t can be
+        * `unsinged long long' on some architectures. The kernel side expects
+        * a unsigned long however (32 bits is enough). Without the cast this
+        * goes OK on LE, on BE however we end up with the wrong bits...
+        */
        if (error && !offset)
-               error = ioctl(dev, SNAPSHOT_SET_SWAP_FILE, blkdev);
+               error = ioctl(dev, SNAPSHOT_SET_SWAP_FILE, (unsigned 
long)(blkdev));

        return error;
 }

Attachment: signature.asc
Description: PGP signature

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Suspend-devel mailing list
Suspend-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/suspend-devel

Reply via email to