[CRIU] [PATCH v2] protobuf: use generic show function for ipc namespace variables

Kinsbursky Stanislav skinsbursky at openvz.org
Thu Jul 26 04:54:29 EDT 2012


v2:
1) Debug garbage removed

Signed-off-by: Stanislav Kinsbursky <skinsbursky at openvz.org>

---
 ipc_ns.c |   17 +----------------
 1 files changed, 1 insertions(+), 16 deletions(-)

diff --git a/ipc_ns.c b/ipc_ns.c
index ada4063..f35852c 100644
--- a/ipc_ns.c
+++ b/ipc_ns.c
@@ -534,24 +534,9 @@ void show_ipc_shm(int fd, struct cr_options *o)
 				o->show_pages_content);
 }
 
-static void show_ipc_var_entry(int fd)
-{
-	int ret;
-	IpcVarEntry *var;
-
-	ret = pb_read_eof(fd, &var, ipc_var_entry);
-	if (ret <= 0)
-		return;
-	ipc_sysctl_req(var, CTL_SHOW);
-
-	ipc_var_entry__free_unpacked(var, NULL);
-}
-
 void show_ipc_var(int fd, struct cr_options *o)
 {
-	pr_img_head(CR_FD_IPCNS);
-	show_ipc_var_entry(fd);
-	pr_img_tail(CR_FD_IPCNS);
+	pb_show_vertical(fd, ipc_var_entry);
 }
 
 static int prepare_ipc_sem_values(int fd, const IpcSemEntry *entry)



More information about the CRIU mailing list