Hi,
Apparently we have used wrond console ioctls around freeze() in
suspend_system() and in a wrong order. The appended patch fixes
this.
Comments welcome.
Rafael
--
suspend.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
Index: suspend/suspend.c
===================================================================
--- suspend.orig/suspend.c
+++ suspend/suspend.c
@@ -620,11 +620,6 @@ static void shutdown(void)
while(1);
}
-#define switch_vt_mode(fd, vt, ioc1, ioc2) ioctl(fd, KDSKBMODE, ioc1); \
- ioctl(fd, VT_ACTIVATE, vt); \
- ioctl(fd, VT_WAITACTIVE, vt); \
- ioctl(fd, KDSKBMODE, ioc2);
-
int suspend_system(int snapshot_fd, int resume_fd, int vt_fd, int vt_no)
{
loff_t avail_swap;
@@ -641,9 +636,15 @@ int suspend_system(int snapshot_fd, int
return ENOSPC;
}
- switch_vt_mode(vt_fd, vt_no, K_MEDIUMRAW, KD_GRAPHICS);
+ ioctl(vt_fd, KDSKBMODE, K_MEDIUMRAW);
+ ioctl(vt_fd, VT_ACTIVATE, vt_no);
+ ioctl(vt_fd, VT_WAITACTIVE, vt_no);
+ ioctl(vt_fd, KDSETMODE, KD_GRAPHICS);
error = freeze(snapshot_fd);
- switch_vt_mode(vt_fd, vt_no, KD_TEXT, K_XLATE);
+ ioctl(vt_fd, KDSETMODE, KD_TEXT);
+ ioctl(vt_fd, KDSKBMODE, K_XLATE);
+ ioctl(vt_fd, VT_ACTIVATE, vt_no);
+ ioctl(vt_fd, VT_WAITACTIVE, vt_no);
splash.switch_to();
splash.progress(15);
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Suspend-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/suspend-devel