From 43582039ff7cf0bfd6f129cc3e7edd1d2db2d904 Mon Sep 17 00:00:00 2001 From: Lai Jiangshan Date: Fri, 23 Dec 2016 15:37:35 +0800 Subject: [PATCH] remove some noisy log Signed-off-by: Lai Jiangshan --- src/event.c | 2 -- src/exec.c | 5 ----- src/init.c | 11 +++-------- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/src/event.c b/src/event.c index fd3afb51..20f02b24 100644 --- a/src/event.c +++ b/src/event.c @@ -178,8 +178,6 @@ void hyper_event_hup(struct hyper_event *he, int efd) int hyper_handle_event(int efd, struct epoll_event *event) { struct hyper_event *he = event->data.ptr; - fprintf(stdout, "%s get event %d, he %p, fd %d. ops %p\n", - __func__, event->events, he, he->fd, he->ops); /* do not handle hup event if have in/out event */ if ((event->events & EPOLLIN) && he->ops->read) { diff --git a/src/exec.c b/src/exec.c index 96b1c534..84b1f887 100644 --- a/src/exec.c +++ b/src/exec.c @@ -737,7 +737,6 @@ struct hyper_exec *hyper_find_exec_by_pid(struct list_head *head, int pid) struct hyper_exec *exec; list_for_each_entry(exec, head, list) { - fprintf(stdout, "exec pid %d, pid %d\n", exec->pid, pid); if (exec->pid != pid) continue; @@ -752,8 +751,6 @@ struct hyper_exec *hyper_find_exec_by_seq(struct hyper_pod *pod, uint64_t seq) struct hyper_exec *exec; list_for_each_entry(exec, &pod->exec_head, list) { - fprintf(stdout, "exec seq %" PRIu64 ", seq %" PRIu64 "\n", - exec->seq, seq); if (exec->seq != seq) continue; @@ -821,8 +818,6 @@ int hyper_handle_exec_exit(struct hyper_pod *pod, int pid, uint8_t code) exec = hyper_find_exec_by_pid(&pod->exec_head, pid); if (exec == NULL) { - fprintf(stdout, "can not find exec whose pid is %d\n", - pid); return 0; } diff --git a/src/init.c b/src/init.c index df67fc32..3b80ba99 100644 --- a/src/init.c +++ b/src/init.c @@ -1086,16 +1086,14 @@ static int hyper_ctlmsg_handle(struct hyper_event *he, uint32_t len) struct hyper_pod *pod = he->ptr; uint32_t type = 0, datalen = 0; uint8_t *data = NULL; - int i, ret = 0; + int ret = 0; // append a null byte to it. hyper_ctlfd_read() left this room for us. buf->data[buf->get] = 0; - for (i = 0; i < buf->get; i++) - fprintf(stdout, "%0x ", buf->data[i]); type = hyper_get_be32(buf->data); - fprintf(stdout, "\n %s, type %" PRIu32 ", len %" PRIu32 "\n", + fprintf(stdout, "%s, type %" PRIu32 ", len %" PRIu32 "\n", __func__, type, len); switch (type) { @@ -1171,8 +1169,6 @@ static int hyper_ctlfd_read(struct hyper_event *he, int efd, int events) int size; int ret; - fprintf(stdout, "%s\n", __func__); - if (buf->get < CONTROL_HEADER_SIZE) { size = hyper_channel_read(he, efd, CONTROL_HEADER_SIZE - buf->get, events); if (size < 0) { @@ -1191,7 +1187,7 @@ static int hyper_ctlfd_read(struct hyper_event *he, int efd, int events) } len = hyper_get_be32(buf->data + CONTROL_HEADER_LENGTH_OFFSET); - fprintf(stdout, "get length %" PRIu32"\n", len); + fprintf(stdout, "%s: get length %" PRIu32"\n", __func__, len); // test it with '>=' to leave at least one byte in hyper_ctlfd_handle(), // so that hyper_ctlfd_handle() can convert the data to c-string inplace. if (len >= buf->size) { @@ -1336,7 +1332,6 @@ static int hyper_loop(void) perror("hyper wait event failed"); return -1; } - fprintf(stdout, "%s epoll_wait %d\n", __func__, n); for (i = 0; i < n; i++) { if (hyper_handle_event(hyper_epoll.efd, &events[i]) < 0)