[CRIU] [PATCH 12/13] image-desc: Use unsigned format for tmpfs image

Cyrill Gorcunov gorcunov at openvz.org
Fri Oct 20 00:59:43 MSK 2017


The index comes from mnt_id which is signed integer
both in kernel and in userspace, but negative value
is never valid, thus don't use it.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 criu/image-desc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/criu/image-desc.c b/criu/image-desc.c
index 49ee1ffdf877..3ce8f854de27 100644
--- a/criu/image-desc.c
+++ b/criu/image-desc.c
@@ -76,7 +76,7 @@ struct cr_fd_desc_tmpl imgset_template[CR_FD_MAX] = {
 	FD_ENTRY_F(RULE,	"rule-%u", O_NOBUF),
 	FD_ENTRY_F(IPTABLES,	"iptables-%u", O_NOBUF),
 	FD_ENTRY_F(IP6TABLES,	"ip6tables-%u", O_NOBUF),
-	FD_ENTRY_F(TMPFS_IMG,	"tmpfs-%d.tar.gz", O_NOBUF),
+	FD_ENTRY_F(TMPFS_IMG,	"tmpfs-%u.tar.gz", O_NOBUF),
 	FD_ENTRY_F(TMPFS_DEV,	"tmpfs-dev-%u.tar.gz", O_NOBUF),
 	FD_ENTRY_F(AUTOFS,	"autofs-%u", O_NOBUF),
 	FD_ENTRY(BINFMT_MISC_OLD, "binfmt-misc-%u"),
-- 
2.7.5



More information about the CRIU mailing list