diff --git a/.gitignore b/.gitignore index 91b0b3f..f78b6a7 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,8 @@ .#* .git .deps +TAGS +tags init build/hyper_daemon build/hyper-initrd.img diff --git a/src/container.c b/src/container.c index fa28e6d..b950e8c 100644 --- a/src/container.c +++ b/src/container.c @@ -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; } diff --git a/src/init.c b/src/init.c index 7b24377..56bd8fd 100644 --- a/src/init.c +++ b/src/init.c @@ -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; } diff --git a/src/util.c b/src/util.c index d28b817..df04e3d 100644 --- a/src/util.c +++ b/src/util.c @@ -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; }