[lxc-devel] [lxc/master] use strverscmp instead of strcmp when comparing CRIU versions
evgeni on Github
lxc-bot at linuxcontainers.org
Fri Sep 1 18:09:24 UTC 2017
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 346 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20170901/f956d7f5/attachment.bin>
-------------- next part --------------
From 26bba91da8331786171289c23270da36c943647e Mon Sep 17 00:00:00 2001
From: Evgeni Golov <evgeni at golov.de>
Date: Fri, 1 Sep 2017 20:01:35 +0200
Subject: [PATCH] use strverscmp instead of strcmp when comparing CRIU versions
Signed-off-by: Evgeni Golov <evgeni at golov.de>
---
src/lxc/criu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lxc/criu.c b/src/lxc/criu.c
index 62a0eb7d6..d6ab06089 100644
--- a/src/lxc/criu.c
+++ b/src/lxc/criu.c
@@ -500,7 +500,7 @@ static void exec_criu(struct criu_opts *opts)
struct lxc_netdev *n = it->elem;
bool external_not_veth;
- if (strcmp(opts->criu_version, CRIU_EXTERNAL_NOT_VETH) >= 0) {
+ if (strverscmp(opts->criu_version, CRIU_EXTERNAL_NOT_VETH) >= 0) {
/* Since criu version 2.8 the usage of --veth-pair
* has been deprecated:
* git tag --contains f2037e6d3445fc400
More information about the lxc-devel
mailing list