Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Commit 793064d

Browse files
authored
Merge pull request #244 from gao-feng/logs
remove some logs
2 parents 9c97989 + f57e397 commit 793064d

File tree

4 files changed

+3
-11
lines changed

4 files changed

+3
-11
lines changed

src/container.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,8 +546,6 @@ static int hyper_setup_container_rootfs(void *data)
546546
goto fail;
547547
}
548548

549-
fprintf(stdout, "container root directory %s\n", root);
550-
551549
if (container->fstype) {
552550
char dev[128];
553551
char *options = NULL;

src/exec.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,31 +67,28 @@ static int hyper_send_exec_code(struct hyper_exec *exec) {
6767

6868
static void pts_hup(struct hyper_event *de, int efd, struct hyper_exec *exec)
6969
{
70-
fprintf(stdout, "%s, seq %" PRIu64"\n", __func__, exec->seq);
71-
7270
hyper_event_hup(de, efd);
73-
7471
hyper_release_exec(exec);
7572
}
7673

7774
static void stdin_hup(struct hyper_event *de, int efd)
7875
{
7976
struct hyper_exec *exec = container_of(de, struct hyper_exec, stdinev);
80-
fprintf(stdout, "%s\n", __func__);
77+
fprintf(stdout, "%s, seq %" PRIu64", id %s\n", __func__, exec->seq, exec->id);
8178
return pts_hup(de, efd, exec);
8279
}
8380

8481
static void stdout_hup(struct hyper_event *de, int efd)
8582
{
8683
struct hyper_exec *exec = container_of(de, struct hyper_exec, stdoutev);
87-
fprintf(stdout, "%s\n", __func__);
84+
fprintf(stdout, "%s, seq %" PRIu64", id %s\n", __func__, exec->seq, exec->id);
8885
return pts_hup(de, efd, exec);
8986
}
9087

9188
static void stderr_hup(struct hyper_event *de, int efd)
9289
{
9390
struct hyper_exec *exec = container_of(de, struct hyper_exec, stderrev);
94-
fprintf(stdout, "%s\n", __func__);
91+
fprintf(stdout, "%s, seq %" PRIu64", id %s\n", __func__, exec->seq, exec->id);
9592
return pts_hup(de, efd, exec);
9693
}
9794

@@ -831,7 +828,6 @@ static int hyper_kill_container_processes(struct hyper_container *c) {
831828
if (st.st_ino != st1.st_ino)
832829
continue;
833830

834-
fprintf(stdout, "kill process of container %d\n", pid);
835831
kill(pid, SIGKILL);
836832
loop = 1;
837833
}

src/init.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ static void hyper_term_all(struct hyper_pod *pod)
155155
fprintf(stdout, "Sending SIGTERM\n");
156156

157157
for (--index; index >= 0; --index) {
158-
fprintf(stdout, "kill process %d\n", pids[index]);
159158
kill(pids[index], SIGTERM);
160159
}
161160

src/net.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ static int hyper_get_ifindex(char *nic)
166166
int fd, ifindex = -1;
167167
char path[512], buf[8];
168168

169-
fprintf(stdout, "net device %s\n", nic);
170169
sprintf(path, "/sys/class/net/%s/ifindex", nic);
171170
fprintf(stdout, "net device sys path is %s\n", path);
172171

0 commit comments

Comments
 (0)