This repository was archived by the owner on Feb 8, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -190,7 +190,8 @@ static int container_setup_modules(struct hyper_container *container)
190190 return 0 ;
191191 }
192192 } else if (errno == ENOENT ) {
193- hyper_mkdir (dst );
193+ if (hyper_mkdir (dst ) < 0 )
194+ return -1 ;
194195 } else {
195196 return -1 ;
196197 }
@@ -572,10 +573,8 @@ static int hyper_container_init(void *data)
572573 goto fail ;
573574 }
574575
575- if (container_setup_modules (container ) < 0 ) {
576- fprintf (stderr , "container sets up modules failed\n" );
577- goto fail ;
578- }
576+ // ignore error of setup modules
577+ container_setup_modules (container );
579578
580579 if (container_setup_volume (container ) < 0 ) {
581580 fprintf (stderr , "container sets up voulme failed\n" );
@@ -653,7 +652,7 @@ static int hyper_setup_pty(struct hyper_container *c)
653652int hyper_start_container (struct hyper_container * container ,
654653 int utsns , int ipcns , struct hyper_pod * pod )
655654{
656- int stacksize = getpagesize () * 4 ;
655+ int stacksize = getpagesize () * 42 ;
657656 struct hyper_container_arg arg = {
658657 .c = container ,
659658 .pod = pod ,
Original file line number Diff line number Diff line change @@ -181,8 +181,10 @@ int hyper_mkdir(char *hyper_path)
181181 }
182182
183183 fprintf (stdout , "create directory %s\n" , path );
184- if (mkdir (path , 0755 ) < 0 && errno != EEXIST )
184+ if (mkdir (path , 0755 ) < 0 && errno != EEXIST ) {
185+ perror ("failed to create directory" );
185186 return -1 ;
187+ }
186188
187189 return 0 ;
188190}
You can’t perform that action at this time.
0 commit comments