Hi,
since 2.6.20 still oopses when we try to suspend with platform mode on !ACPI
machines, i'd suggest something like that (and i have yet to see a machine,
where ->prepare fails, but ->enter works, but those can still be activated
with "platform-force".
Index: suspend.c
===================================================================
RCS file: /cvsroot/suspend/suspend/suspend.c,v
retrieving revision 1.69
diff -u -p -r1.69 suspend.c
--- suspend.c 2 Feb 2007 16:08:47 -0000 1.69
+++ suspend.c 21 Feb 2007 13:15:49 -0000
@@ -763,9 +763,15 @@ int suspend_system(int snapshot_fd, int
if (use_platform_suspend) {
int ret = platform_prepare(snapshot_fd);
- if (ret < 0)
+ if (ret < 0) {
fprintf(stderr, "suspend: pm_ops->prepare returned "
"error %d\n", ret);
+ use_platform_suspend--;
+ if (use_platform_suspend)
+ fprintf(stderr, " but platform mode
forced.\n");
+ else
+ fprintf(stderr, " falling back to shutdown
mode.\n");
+ }
}
printf("suspend: Snapshotting system\n");
@@ -1254,7 +1260,10 @@ int main(int argc, char *argv[])
if (early_writeout != 'n' && early_writeout != 'N')
early_writeout = 1;
- use_platform_suspend = !strcmp(shutdown_method, "platform");
+ if (!strcmp(shutdown_method, "platform"))
+ use_platform_suspend = 1;
+ else if (!strcmp(shutdown_method, "platform-force"))
+ use_platform_suspend = 2;
page_size = getpagesize();
buffer_size = BUFFER_PAGES * page_size;
--
Stefan Seyfried
"Any ideas, John?"
"Well, surrounding them's out."
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/suspend-devel