[CRIU] [PATCH 03/12] posix-timer: Add fd, magic and show functionality.

Pavel Tikhomirov snorcht at gmail.com
Thu Jun 27 12:32:19 EDT 2013


Signed-off-by: Pavel Tikhomirov <snorcht at gmail.com>
---
 cr-show.c            |    5 +++++
 image-desc.c         |    1 +
 include/cr-show.h    |    1 +
 include/crtools.h    |    1 +
 include/image-desc.h |    1 +
 include/magic.h      |    1 +
 6 files changed, 10 insertions(+)

diff --git a/cr-show.c b/cr-show.c
index 15cc907..a9ee7de 100644
--- a/cr-show.c
+++ b/cr-show.c
@@ -260,6 +260,11 @@ void show_itimers(int fd)
 	pb_show_plain_pretty(fd, PB_ITIMERS, "*:%Lu");
 }
 
+void show_posix_timers(int fd)
+{
+	pb_show_plain_pretty(fd, PB_POSIX_TIMERS, "*:%d 5:%Lu 7:%Lu 8:%lu 9:%Lu 10:%Lu");
+}
+
 void show_creds(int fd)
 {
 	pb_show_vertical(fd, PB_CREDS);
diff --git a/image-desc.c b/image-desc.c
index 5e08ac8..78928f9 100644
--- a/image-desc.c
+++ b/image-desc.c
@@ -49,6 +49,7 @@ struct cr_fd_desc_tmpl fdset_template[CR_FD_MAX] = {
 	FD_ENTRY(NETLINKSK,	"netlinksk",		show_netlinksk),
 	FD_ENTRY(SK_QUEUES,	"sk-queues",		show_sk_queues),
 	FD_ENTRY(ITIMERS,	"itimers-%d",		show_itimers),
+	FD_ENTRY(POSIX_TIMERS,	"posix-timers-%d",	show_posix_timers),
 	FD_ENTRY(CREDS,		"creds-%d",		show_creds),
 	FD_ENTRY(UTSNS,		"utsns-%d",		show_utsns),
 	FD_ENTRY(IPCNS_VAR,	"ipcns-var-%d",		show_ipc_var),
diff --git a/include/cr-show.h b/include/cr-show.h
index c2428df..551ed6a 100644
--- a/include/cr-show.h
+++ b/include/cr-show.h
@@ -17,6 +17,7 @@ extern void show_pstree(int fd);
 extern void show_sigacts(int fd);
 extern void show_siginfo(int fd);
 extern void show_itimers(int fd);
+extern void show_posix_timers(int fd);
 extern void show_creds(int fd);
 extern void show_fs(int fd);
 extern void show_remap_files(int fd);
diff --git a/include/crtools.h b/include/crtools.h
index c9a6b10..81e89e1 100644
--- a/include/crtools.h
+++ b/include/crtools.h
@@ -73,6 +73,7 @@ extern int close_service_fd(enum sfd_type type);
 extern bool is_service_fd(int fd, enum sfd_type type);
 extern bool is_any_service_fd(int fd);
 
+void show_posix_timers(int fd);
 int check_img_inventory(void);
 int write_img_inventory(void);
 void kill_inventory(void);
diff --git a/include/image-desc.h b/include/image-desc.h
index 1e1a2a0..609552b 100644
--- a/include/image-desc.h
+++ b/include/image-desc.h
@@ -18,6 +18,7 @@ enum {
 	CR_FD_VMAS,
 	CR_FD_SIGACT,
 	CR_FD_ITIMERS,
+	CR_FD_POSIX_TIMERS,
 	CR_FD_CREDS,
 	CR_FD_FS,
 	CR_FD_RLIMIT,
diff --git a/include/magic.h b/include/magic.h
index cdda0f0..8b7cc58 100644
--- a/include/magic.h
+++ b/include/magic.h
@@ -38,6 +38,7 @@
 #define INETSK_MAGIC		0x56443851 /* Pereslavl */
 #define PACKETSK_MAGIC		0x60454618 /* Veliky Ustyug */
 #define ITIMERS_MAGIC		0x57464056 /* Kostroma */
+#define POSIX_TIMERS_MAGIC	0x52603957 /* Lipetsk */
 #define SK_QUEUES_MAGIC		0x56264026 /* Suzdal */
 #define UTSNS_MAGIC		0x54473203 /* Smolensk */
 #define CREDS_MAGIC		0x54023547 /* Kozelsk */
-- 
1.7.9.5



More information about the CRIU mailing list