OpenVZ Forum


Home » Mailing lists » Devel » [PATCH 0/2] cryo: fixes for handling options -l and -f
[PATCH 2/2] cryo: Fix option -f in checkpointing mode [message #30866 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
Option -f couldn't be used in conjunction with option -p (for checkpointing).
O_CREAT is missing in the flags passed to open().

Now, we can do:

$ cr -p MYPID -f test.cryo

(I know the coding style is not perfect (long lines, several instructions
on the same line), but it fits with cryo's style :) ).

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

Index: cryodev/cr.c
===================================================================
--- cryodev.orig/cr.c
+++ cryodev/cr.c
@@ -1234,7 +1234,7 @@ int main(int argc, char **argv)
 		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;
+		case 'p':	mode = ch; fd = 1; perm = O_WRONLY|O_CREAT; pid = (pid_t)atoi(optarg); break;
 		case 'r':	mode = ch; break;
 		case 'f':	strncpy(filename, optarg, sizeof(filename)); break;
 		default:	usage(); exit(1);

-- 
_______________________________________________
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 11 23:23:24 GMT 2024

Total time taken to generate the page: 0.02253 seconds