On 4/22/07, Tim Dijkstra <[EMAIL PROTECTED]> wrote:
> On Sun, 22 Apr 2007 21:18:46 +0200
> "Rafael J. Wysocki" <[EMAIL PROTECTED]> wrote:
> > I've tested with a swap on a "regular" partition and it works as expected.
> > If provided with the right swap offset (as returned by swap-offset from a
> > recent CVS), suspends and resumes. When provided with a wrong offset,
> > refuses to do anything.
> >
> > I think we have to debug the swap-file-on-LVM case more thoroughly.
>
> OK, I've tried printing out /dev/resume_device + offset in mark_swap.
> Does the following seem reasonable?
>
>
> char ff[100];
> lseek(fd, shift, SEEK_SET);
> read(fd,ff,80);
> printf("The header (shift %u): %80s\n", shift, ff);
>
>
> It prints nothing ...
What's "shift"? swap-offset prints the offset in PAGE_SIZE units, so
you must multiply it by 4096 to get a byte offset. Furthermore the
swap signature is at the end of the first page.
So you'd do:
shift = swap_offset_number * 4096 + 4096 - 10 (10 is the size of the signature).
Luca
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Suspend-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/suspend-devel