OpenVZ Forum


Home » Mailing lists » Devel » [PATCH 0/2] cryo: fixes for handling options -l and -f
[PATCH 1/2] cryo: Fix option -l [message #30865 is a reply to message #30864] Mon, 09 June 2008 14:47 Go to previous messageGo to previous message
Benjamin Thery is currently offline  Benjamin Thery
Messages: 79
Registered: March 2007
Member
This tiny patch fixes the handling of option -l.
'l' must be added to the getopt() call and the subsequent switch{] if
we don't want to exit too soon.

This makes the following command works:

$ cr -l -t test.cryo

Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
---
 cr.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: cryodev/cr.c
===================================================================
--- cryodev.orig/cr.c
+++ cryodev/cr.c
@@ -1227,10 +1227,11 @@ int main(int argc, char **argv)
 	int fd = 0;
 	int perm = O_RDONLY;
 
-	while ((ch = getopt(argc, argv, "dmp:rRksf:")) != EOF) {
+	while ((ch = getopt(argc, argv, "dlmp:rRksf:")) != EOF) {
 		switch (ch) {
 		case 'd': 	cr_mode |= CR_DEBUG; Debug_mode = 1; break;
 		case 'k': 	cr_mode |= CR_KILL; break;
+		case 'l':	mode = ch; break;
 		case 's':	cr_mode |= CR_STOP; break;
 		case 'm':	cr_mode |= CR_MMAP; break;
 		case 'p':	mode = ch; fd = 1; perm = O_WRONLY; pid = (pid_t)atoi(optarg); break;

-- 
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: restarting tests/sleep
Next Topic: Re: restarting tests/sleep
Goto Forum:
  


Current Time: Thu Jul 10 01:28:37 GMT 2025

Total time taken to generate the page: 0.03839 seconds