[CRIU] [PATCH 1/4] ghost: Fixup mkreg_ghost prototype

Pavel Emelyanov xemul at virtuozzo.com
Thu Jun 15 19:04:11 MSK 2017


We don't need gf there, but will need more than just mode.

Signed-off-by: Pavel Emelyanov <xemul at virtuozzo.com>
---
 criu/files-reg.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/criu/files-reg.c b/criu/files-reg.c
index 0a5fd83..5b72aa7 100644
--- a/criu/files-reg.c
+++ b/criu/files-reg.c
@@ -142,11 +142,11 @@ static int trim_last_parent(char *path)
 	return 0;
 }
 
-static int mkreg_ghost(char *path, u32 mode, struct ghost_file *gf, struct cr_img *img)
+static int mkreg_ghost(char *path, GhostFileEntry *gfe, struct cr_img *img)
 {
 	int gfd, ret;
 
-	gfd = open(path, O_WRONLY | O_CREAT | O_EXCL, mode);
+	gfd = open(path, O_WRONLY | O_CREAT | O_EXCL, gfe->mode);
 	if (gfd < 0)
 		return -1;
 
@@ -218,7 +218,7 @@ again:
 		if ((ret = mkdirpat(AT_FDCWD, path, gfe->mode)) < 0)
 			msg = "Can't make ghost dir";
 	} else {
-		if ((ret = mkreg_ghost(path, gfe->mode, gf, img)) < 0)
+		if ((ret = mkreg_ghost(path, gfe, img)) < 0)
 			msg = "Can't create ghost regfile";
 	}
 
-- 
2.1.4



More information about the CRIU mailing list