mirror of
https://github.com/clearlinux/hyperstart.git
synced 2026-08-27 11:56:04 +00:00
Merge pull request #84 from laijs/allow-container_setup_modules-failed
Allow container_setup_modules() failed
This commit is contained in:
+5
-6
@@ -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;
|
||||
}
|
||||
@@ -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");
|
||||
@@ -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,
|
||||
|
||||
+3
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user