mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-14 15:29:56 +00:00
assertion on lxc_checkpoint() return value
Buggy behaviour always deserves an assertion. Signed-off-by: Greg Kurz <gkurz@fr.ibm.com> Signed-off-by: Cedric Le Goater <clg@fr.ibm.com> Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
This commit is contained in:
parent
b3df193c50
commit
8c94bc8551
@ -21,6 +21,7 @@
|
|||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
|
#include <assert.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@ -128,6 +129,9 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = lxc_checkpoint(my_args.name, sfd, my_args.flags);
|
ret = lxc_checkpoint(my_args.name, sfd, my_args.flags);
|
||||||
|
|
||||||
|
assert(ret == 0 || ret == -1);
|
||||||
|
|
||||||
if (ret)
|
if (ret)
|
||||||
ERROR("failed to checkpoint '%s'", my_args.name);
|
ERROR("failed to checkpoint '%s'", my_args.name);
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user