mirror of
https://github.com/clearlinux/hyperstart.git
synced 2026-08-28 04:56:50 +00:00
ignore error of setup modules
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
This commit is contained in:
+4
-5
@@ -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");
|
||||
|
||||
+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