mirror of
https://github.com/clearlinux/hyperstart.git
synced 2026-08-21 05:28:08 +00:00
Merge pull request #159 from dlespiau/20160912-trivial
A few trivial changes
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
.#*
|
||||
.git
|
||||
.deps
|
||||
TAGS
|
||||
tags
|
||||
init
|
||||
build/hyper_daemon
|
||||
build/hyper-initrd.img
|
||||
|
||||
+6
-6
@@ -32,7 +32,7 @@ static int container_populate_volume(char *src, char *dest)
|
||||
|
||||
if (stat(dest, &st) == 0) {
|
||||
if (!S_ISDIR(st.st_mode)) {
|
||||
fprintf(stderr, "the _data in volume %s is not directroy\n", dest);
|
||||
fprintf(stderr, "the _data in volume %s is not directory\n", dest);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ static int container_populate_volume(char *src, char *dest)
|
||||
}
|
||||
|
||||
if (hyper_mkdir(dest, 0777) < 0) {
|
||||
fprintf(stderr, "fail to create directroy %s\n", dest);
|
||||
fprintf(stderr, "fail to create directory %s\n", dest);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -173,7 +173,7 @@ static int container_setup_volume(struct hyper_container *container)
|
||||
sprintf(volume, "/%s/_data/%s", path, filevolume);
|
||||
/* 0777 so that any user can read/write the new file volume */
|
||||
if (chmod(volume, 0777) < 0) {
|
||||
fprintf(stderr, "fail to chmod directroy %s\n", volume);
|
||||
fprintf(stderr, "fail to chmod directory %s\n", volume);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -471,7 +471,7 @@ static int hyper_rescan_scsi(void)
|
||||
|
||||
num = scandir("/sys/class/scsi_host/", &list, NULL, NULL);
|
||||
if (num < 0) {
|
||||
perror("scan /sys/calss/virtio-ports/ failed");
|
||||
perror("scan /sys/class/scsi_host/ failed");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -553,7 +553,7 @@ static int hyper_setup_container_rootfs(void *data)
|
||||
|
||||
sprintf(root, "/tmp/hyper/%s/root/", container->id);
|
||||
if (hyper_mkdir(root, 0755) < 0) {
|
||||
perror("make root directroy failed");
|
||||
perror("make root directory failed");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
@@ -666,7 +666,7 @@ static int hyper_setup_pty(struct hyper_container *c)
|
||||
sprintf(root, "/tmp/hyper/%s/devpts/", c->id);
|
||||
|
||||
if (hyper_mkdir(root, 0755) < 0) {
|
||||
perror("make container pts directroy failed");
|
||||
perror("make container pts directory failed");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
+7
-7
@@ -421,7 +421,7 @@ static int hyper_setup_shared(struct hyper_pod *pod)
|
||||
struct vbsf_mount_info_new mntinf;
|
||||
|
||||
if (pod->share_tag == NULL) {
|
||||
fprintf(stdout, "no shared directroy\n");
|
||||
fprintf(stdout, "no shared directory\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -452,7 +452,7 @@ static int hyper_setup_shared(struct hyper_pod *pod)
|
||||
static int hyper_setup_shared(struct hyper_pod *pod)
|
||||
{
|
||||
if (pod->share_tag == NULL) {
|
||||
fprintf(stdout, "no shared directroy\n");
|
||||
fprintf(stdout, "no shared directory\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -474,7 +474,7 @@ static int hyper_setup_shared(struct hyper_pod *pod)
|
||||
|
||||
static int hyper_setup_pod(struct hyper_pod *pod)
|
||||
{
|
||||
/* create tmp proc directroy */
|
||||
/* create tmp proc directory */
|
||||
if (hyper_mkdir("/tmp/hyper/proc", 0755) < 0) {
|
||||
perror("create tmp proc failed");
|
||||
return -1;
|
||||
@@ -897,7 +897,7 @@ static void hyper_cleanup_hostname(struct hyper_pod *pod)
|
||||
static void hyper_cleanup_shared(struct hyper_pod *pod)
|
||||
{
|
||||
if (pod->share_tag == NULL) {
|
||||
fprintf(stdout, "no shared directroy\n");
|
||||
fprintf(stdout, "no shared directory\n");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1251,7 +1251,7 @@ int main(int argc, char *argv[])
|
||||
hyper_mkdir("/sys", 0755) < 0 ||
|
||||
hyper_mkdir("/sbin", 0755) < 0 ||
|
||||
hyper_mkdir("/proc", 0755) < 0) {
|
||||
perror("create basic directroy failed");
|
||||
perror("create basic directory failed");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -1268,12 +1268,12 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
if (mount("dev", "/dev", "devtmpfs", MS_NOSUID, NULL) == -1) {
|
||||
perror("mount sysfs failed");
|
||||
perror("mount devtmpfs failed");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (hyper_mkdir("/dev/pts", 0755) < 0) {
|
||||
perror("create basic directroy failed");
|
||||
perror("create basic directory failed");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -512,7 +512,7 @@ int hyper_open_channel(char *channel, int mode)
|
||||
|
||||
num = scandir("/sys/class/virtio-ports/", &list, NULL, NULL);
|
||||
if (num < 0) {
|
||||
perror("scan /sys/calss/virtio-ports/ failed");
|
||||
perror("scan /sys/class/virtio-ports/ failed");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user