Skip to contentSkip to conversation

suspend-to-both (less ugly version)

PATCH Pavel Machek 3 participants 3 messages Mar 15, 2006 Kbuild

lore
Share & tools
lore
#0 lore raw

Hi!

Here's less ugly version of suspend-to-both patch. Code needs to become optional on some command-line option, and then it may even be ready for merge suspend.sf.net.

Ahha, and will have something to do with that chroot-safety-net.

Any testers?
Pavel

Index: Makefile
===================================================================
RCS file: /cvsroot/suspend/suspend/Makefile,v
retrieving revision 1.21

Makefile +2 -2
diff -u -u -r1.21 Makefile
@@ -69,8 +69,8 @@
 vt.o:	vt.c vt.h
 	gcc -Wall -c vt.c
 
-suspend:	md5.o encrypt.o config.o suspend.c swsusp.h config.h encrypt.h md5.h
-	gcc -Wall $(CC_FLAGS) md5.o encrypt.o config.o suspend.c -o suspend $(LD_FLAGS)
+suspend:	md5.o encrypt.o config.o suspend.c swsusp.h config.h encrypt.h md5.h s2ram.c dmidecode.c whitelist.c radeontool.c $(S2RAMOBJ)
+	gcc -g -O2 -DCONFIG_BOTH -Wall $(CC_FLAGS) md5.o encrypt.o config.o suspend.c s2ram.c -o suspend $(S2RAMOBJ) $(LD_FLAGS) -lpci 
 
 resume:	md5.o encrypt.o config.o resume.c swsusp.h config.h encrypt.h md5.h
 	gcc -Wall $(CC_FLAGS) md5.o encrypt.o config.o resume.c -static -o resume $(LD_FLAGS)

Index: s2ram.c
===================================================================
RCS file: /cvsroot/suspend/suspend/s2ram.c,v
retrieving revision 1.29

s2ram.c +2 -0
diff -u -u -r1.29 s2ram.c
@@ -237,6 +239,7 @@
 	exit(1);
 }
 
+#ifndef CONFIG_BOTH
 int main(int argc, char *argv[])
 {
 	int i;
@@ -299,3 +302,4 @@
 	s2ram_resume();
 	return i;
 }
+#endif

Index: suspend.c
===================================================================
RCS file: /cvsroot/suspend/suspend/suspend.c,v
retrieving revision 1.22

suspend.c +57 -3

108 lines not on this page · raw message

Signature · 1 line
119:        CryptoStream cs = new CryptoStream( ms, ct, CryptoStreamMode.Write );
#1 lore raw

Hi,

Quoted 55 lines · Pavel Machek

Here's less ugly version of suspend-to-both patch. Code needs to become optional on some command-line option, and then it may even be ready for merge suspend.sf.net.

Ahha, and will have something to do with that chroot-safety-net.

Any testers?
Pavel

Index: Makefile
===================================================================
RCS file: /cvsroot/suspend/suspend/Makefile,v
retrieving revision 1.21
diff -u -u -r1.21 Makefile

Makefile +2 -2
@@ -69,8 +69,8 @@
 vt.o:	vt.c vt.h
 	gcc -Wall -c vt.c
 
-suspend:	md5.o encrypt.o config.o suspend.c swsusp.h config.h encrypt.h md5.h
-	gcc -Wall $(CC_FLAGS) md5.o encrypt.o config.o suspend.c -o suspend $(LD_FLAGS)
+suspend:	md5.o encrypt.o config.o suspend.c swsusp.h config.h encrypt.h md5.h s2ram.c dmidecode.c whitelist.c radeontool.c $(S2RAMOBJ)
+	gcc -g -O2 -DCONFIG_BOTH -Wall $(CC_FLAGS) md5.o encrypt.o config.o suspend.c s2ram.c -o suspend $(S2RAMOBJ) $(LD_FLAGS) -lpci 
 
 resume:	md5.o encrypt.o config.o resume.c swsusp.h config.h encrypt.h md5.h
 	gcc -Wall $(CC_FLAGS) md5.o encrypt.o config.o resume.c -static -o resume $(LD_FLAGS)

Index: s2ram.c
===================================================================
RCS file: /cvsroot/suspend/suspend/s2ram.c,v
retrieving revision 1.29
diff -u -u -r1.29 s2ram.c

s2ram.c +2 -0
@@ -237,6 +239,7 @@
 	exit(1);
 }
 
+#ifndef CONFIG_BOTH
 int main(int argc, char *argv[])
 {
 	int i;
@@ -299,3 +302,4 @@
 	s2ram_resume();
 	return i;
 }
+#endif

Index: suspend.c
===================================================================
RCS file: /cvsroot/suspend/suspend/suspend.c,v
retrieving revision 1.22
diff -u -u -r1.22 suspend.c

suspend.c line 56

Quoted 4 lines
suspend.c +1 -0
@@ -53,6 +53,7 @@
 #define encrypt 0
 #define key_name NULL
 #endif
+static int s2ram = 1;

I assume this will be an option in the final version? ;-)

Rafael

#2 lore raw

Hi!

Quoted 6 lines
Quoted 6 lines

Index: suspend.c
===================================================================
RCS file: /cvsroot/suspend/suspend/suspend.c,v
retrieving revision 1.22
diff -u -u -r1.22 suspend.c
--- suspend.c 12 Mar 2006 16:17:19 -0000 1.22

Quoted 8 lines

suspend.c line 56

Quoted 6 lines

+++ suspend.c 15 Mar 2006 09:04:41 -0000

suspend.c +1 -0
@@ -53,6 +53,7 @@
 #define encrypt 0
 #define key_name NULL
 #endif
+static int s2ram = 1;

I assume this will be an option in the final version? ;-)

Yes :-).
Pavel

Signature · 1 line
219: * but WITHOUT ANY WARRANTY; without even the implied warranty of