[v5,11/19] epoll: Print efd id when showing targets

Submitted by Cyrill Gorcunov on July 4, 2018, 3:51 p.m.

Details

Message ID 20180704155147.29114-12-gorcunov@gmail.com
State Accepted
Series "epoll: Add support for duped targets"
Headers show

Commit Message

Cyrill Gorcunov July 4, 2018, 3:51 p.m.
To figure out efd:tfd mapping easier by reading the logs.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
 criu/eventpoll.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Patch hide | download patch | download mbox

diff --git a/criu/eventpoll.c b/criu/eventpoll.c
index 3779ebeeb648..a32bdd07d5fe 100644
--- a/criu/eventpoll.c
+++ b/criu/eventpoll.c
@@ -44,10 +44,10 @@  int is_eventpoll_link(char *link)
 	return is_anon_link_type(link, "[eventpoll]");
 }
 
-static void pr_info_eventpoll_tfd(char *action, EventpollTfdEntry *e)
+static void pr_info_eventpoll_tfd(char *action, uint32_t id, EventpollTfdEntry *e)
 {
-	pr_info("%seventpoll-tfd: tfd %8d events %#08x data %#016"PRIx64"\n",
-		action, e->tfd, e->events, e->data);
+	pr_info("%seventpoll-tfd: id %#08x tfd %8d events %#08x data %#016"PRIx64"\n",
+		action, id, e->tfd, e->events, e->data);
 }
 
 static void pr_info_eventpoll(char *action, EventpollFileEntry *e)
@@ -196,7 +196,7 @@  static int dump_one_eventpoll(int lfd, u32 id, const struct fd_parms *p)
 	ret = pb_write_one(img_from_set(glob_imgset, CR_FD_FILES), &fe, PB_FILE);
 	if (!ret) {
 		for (i = 0; i < e.n_tfd; i++)
-			pr_info_eventpoll_tfd("Dumping: ", e.tfd[i]);
+			pr_info_eventpoll_tfd("Dumping: ", e.id, e.tfd[i]);
 	}
 
 	/* Restore former values to free resources */
@@ -277,7 +277,7 @@  static int eventpoll_retore_tfd(int fd, int id, EventpollTfdEntry *tdefe)
 {
 	struct epoll_event event;
 
-	pr_info_eventpoll_tfd("Restore ", tdefe);
+	pr_info_eventpoll_tfd("Restore ", id, tdefe);
 
 	event.events	= tdefe->events;
 	event.data.u64	= tdefe->data;