2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-30 22:05:36 +00:00

ghost: Fixup mkreg_ghost prototype

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

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
Pavel Emelyanov
2017-06-15 19:04:11 +03:00
committed by Andrei Vagin
parent 1ddcd443ba
commit c3cff79cd6

View File

@@ -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";
}