[Pm-utils] Re: s2both
Rafael J. Wysocki
rjw at sisk.pl
Wed Mar 14 07:59:59 PDT 2007
On Wednesday, 14 March 2007 12:45, Tim Dijkstra wrote:
> On Tue, 13 Mar 2007 23:28:11 +0100
> "Rafael J. Wysocki" <rjw at sisk.pl> wrote:
> > For uswsusp, you can try to open /dev/snapshot and do some tests.
> > For example, you can check if the SNAPSHOT_SET_IMAGE_SIZE ioctl works
> > (should work if uswsusp is supported). The SNAPSHOT_AVAIL_SWAP should
> > work if the resume swap partition/file is properly configured
> What does 'properly configured' mean for uswsusp? It takes the
> swap-partition from its configuration-file, not from /sys/power/resume,
> doesn't it?
Ah, it was a shortcut, sorry.
You are right, uswsusp (ie. the userland tools themselves) takes the swap from
the configuration file (or command line), but if one is defined in
/sys/power/resume (or in the kernel command line), you can check it with the
SNAPSHOT_AVAIL_SWAP ioctl. However, this only works if /dev/snapshot is
open for reading.
More information about the Pm-utils