|
24 | 24 | #include "parse.h" |
25 | 25 | #include "syscall.h" |
26 | 26 |
|
| 27 | +static int hyper_release_exec(struct hyper_exec *, struct hyper_pod *); |
| 28 | +static void hyper_exec_process(struct hyper_exec *exec); |
| 29 | + |
27 | 30 | static int send_exec_finishing(uint64_t seq, int len, int code, int block) |
28 | 31 | { |
29 | 32 | struct hyper_buf *buf = &ctl.tty.wbuf; |
@@ -202,7 +205,7 @@ struct hyper_event_ops err_ops = { |
202 | 205 | /* don't need write buff, the stderr data is one way */ |
203 | 206 | }; |
204 | 207 |
|
205 | | -int hyper_setup_exec_user(struct hyper_exec *exec) |
| 208 | +static int hyper_setup_exec_user(struct hyper_exec *exec) |
206 | 209 | { |
207 | 210 | char *user = exec->user == NULL || strlen(exec->user) == 0 ? NULL : exec->user; |
208 | 211 | char *group = exec->group == NULL || strlen(exec->group) == 0 ? NULL : exec->group; |
@@ -333,7 +336,7 @@ static int hyper_setup_exec_notty(struct hyper_exec *e) |
333 | 336 | return 0; |
334 | 337 | } |
335 | 338 |
|
336 | | -int hyper_setup_exec_tty(struct hyper_exec *e) |
| 339 | +static int hyper_setup_exec_tty(struct hyper_exec *e) |
337 | 340 | { |
338 | 341 | int unlock = 0; |
339 | 342 | int ptymaster; |
@@ -410,7 +413,7 @@ int hyper_setup_exec_tty(struct hyper_exec *e) |
410 | 413 | return 0; |
411 | 414 | } |
412 | 415 |
|
413 | | -int hyper_dup_exec_tty(struct hyper_exec *e) |
| 416 | +static int hyper_dup_exec_tty(struct hyper_exec *e) |
414 | 417 | { |
415 | 418 | int ret = -1; |
416 | 419 |
|
@@ -457,7 +460,7 @@ int hyper_dup_exec_tty(struct hyper_exec *e) |
457 | 460 | return ret; |
458 | 461 | } |
459 | 462 |
|
460 | | -int hyper_watch_exec_pty(struct hyper_exec *exec, struct hyper_pod *pod) |
| 463 | +static int hyper_watch_exec_pty(struct hyper_exec *exec, struct hyper_pod *pod) |
461 | 464 | { |
462 | 465 | fprintf(stdout, "hyper_init_event container pts event %p, ops %p, fd %d\n", |
463 | 466 | &exec->stdinev, &in_ops, exec->stdinev.fd); |
@@ -607,7 +610,7 @@ static int hyper_do_exec_cmd(struct hyper_exec *exec, struct hyper_pod *pod, int |
607 | 610 | } |
608 | 611 |
|
609 | 612 | // do the exec, no return |
610 | | -void hyper_exec_process(struct hyper_exec *exec) |
| 613 | +static void hyper_exec_process(struct hyper_exec *exec) |
611 | 614 | { |
612 | 615 | if (sigprocmask(SIG_SETMASK, &orig_mask, NULL) < 0) { |
613 | 616 | perror("sigprocmask restore mask failed"); |
@@ -773,8 +776,8 @@ static int hyper_send_pod_finished(struct hyper_pod *pod) |
773 | 776 | return ret; |
774 | 777 | } |
775 | 778 |
|
776 | | -int hyper_release_exec(struct hyper_exec *exec, |
777 | | - struct hyper_pod *pod) |
| 779 | +static int hyper_release_exec(struct hyper_exec *exec, |
| 780 | + struct hyper_pod *pod) |
778 | 781 | { |
779 | 782 | if (--exec->ref != 0) { |
780 | 783 | fprintf(stdout, "still have %d user of exec\n", exec->ref); |
|
0 commit comments