mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-14 11:01:00 +00:00
change the checkpoint/restart function api
As the checkpoint/restart is expected to be sequential, I pass the file descriptor to checkpoint and restart, so that will be up to the caller to open the file descriptor which can be a pipe, socket, file, etc ... Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
This commit is contained in:
parent
34c66a6980
commit
920dfa346c
@ -44,7 +44,7 @@
|
||||
|
||||
lxc_log_define(lxc_checkpoint, lxc);
|
||||
|
||||
int lxc_checkpoint(const char *name, const char *statefile, unsigned long flags)
|
||||
int lxc_checkpoint(const char *name, int fd, unsigned long flags)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -184,8 +184,7 @@ extern const char *lxc_strerror(int error);
|
||||
* @flags : checkpoint flags
|
||||
* Returns 0 on success, < 0 otherwise
|
||||
*/
|
||||
extern int lxc_checkpoint(const char *name, const char *statefile,
|
||||
unsigned long flags);
|
||||
extern int lxc_checkpoint(const char *name, int fd, unsigned long flags);
|
||||
|
||||
/*
|
||||
* Restart a container previously frozen
|
||||
@ -194,8 +193,7 @@ extern int lxc_checkpoint(const char *name, const char *statefile,
|
||||
* @flags : restart flags
|
||||
* Returns 0 on success, < 0 otherwise
|
||||
*/
|
||||
extern int lxc_restart(const char *name, const char *statefile,
|
||||
unsigned long flags);
|
||||
extern int lxc_restart(const char *name, int fd, unsigned long flags);
|
||||
|
||||
/*
|
||||
* Returns the version number of the library
|
||||
|
@ -84,7 +84,7 @@ int main(int argc, char *argv[])
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = lxc_checkpoint(my_args.name, my_args.argv[0], 0);
|
||||
ret = lxc_checkpoint(my_args.name, -1, 0);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
@ -65,7 +65,7 @@ int main(int argc, char *argv[])
|
||||
my_args.progname, my_args.quiet))
|
||||
return -1;
|
||||
|
||||
if (lxc_restart(my_args.name, my_args.argv[0], 0))
|
||||
if (lxc_restart(my_args.name, -1, 0))
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
|
@ -47,8 +47,7 @@ lxc_log_define(lxc_restart, lxc);
|
||||
LXC_TTY_HANDLER(SIGINT);
|
||||
LXC_TTY_HANDLER(SIGQUIT);
|
||||
|
||||
int lxc_restart(const char *name, const char *statefile,
|
||||
unsigned long flags)
|
||||
int lxc_restart(const char *name, int fd, unsigned long flags)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user