Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions src/container.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ static int container_setup_modules(struct hyper_container *container)
return 0;
}
} else if (errno == ENOENT) {
hyper_mkdir(dst);
if (hyper_mkdir(dst) < 0)
return -1;
} else {
return -1;
}
Expand Down Expand Up @@ -572,10 +573,8 @@ static int hyper_container_init(void *data)
goto fail;
}

if (container_setup_modules(container) < 0) {
fprintf(stderr, "container sets up modules failed\n");
goto fail;
}
// ignore error of setup modules
container_setup_modules(container);

if (container_setup_volume(container) < 0) {
fprintf(stderr, "container sets up voulme failed\n");
Expand Down Expand Up @@ -653,7 +652,7 @@ static int hyper_setup_pty(struct hyper_container *c)
int hyper_start_container(struct hyper_container *container,
int utsns, int ipcns, struct hyper_pod *pod)
{
int stacksize = getpagesize() * 4;
int stacksize = getpagesize() * 42;
struct hyper_container_arg arg = {
.c = container,
.pod = pod,
Expand Down
4 changes: 3 additions & 1 deletion src/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,10 @@ int hyper_mkdir(char *hyper_path)
}

fprintf(stdout, "create directory %s\n", path);
if (mkdir(path, 0755) < 0 && errno != EEXIST)
if (mkdir(path, 0755) < 0 && errno != EEXIST) {
perror("failed to create directory");
return -1;
}

return 0;
}
Expand Down