On Fri, 2007-03-30 at 14:01 +0200, Tim Dijkstra wrote:

> --- 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));

Interesting. Maybe I just lucked out? It was definitely able to write
the image after I disabled compression.

Then again. My device is 239:0. Maybe that maps to some other devices
like /dev/null without this fix and that's the reason it couldn't
resume?

johannes

Attachment: signature.asc
Description: This is a digitally signed message part

-------------------------------------------------------------------------
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