[2/2] Deprecate separate images for rlimits, itimers and posix-timers

Submitted by Pavel Emelianov on Aug. 12, 2016, 11:09 a.m.

Details

Message ID 57ADAE80.90908@virtuozzo.com
State Accepted
Series "Deprecation"
Commit 87558aef1bb6e36935aade97885fefb5ae80c501
Headers show

Commit Message

Pavel Emelianov Aug. 12, 2016, 11:09 a.m.
Out-of-core rlims and timers existed before 1.3, so people trying
to restore from images generated of this old CRIU would have to
upgrade.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
---
 criu/cr-restore.c | 9 +++++++++
 1 file changed, 9 insertions(+)

Patch hide | download patch | download mbox

diff --git a/criu/cr-restore.c b/criu/cr-restore.c
index b0ed609..b26e196 100644
--- a/criu/cr-restore.c
+++ b/criu/cr-restore.c
@@ -2186,6 +2186,9 @@  static int prepare_itimers_from_fd(int pid, struct task_restore_args *args)
 	struct cr_img *img;
 	ItimerEntry *ie;
 
+	if (!deprecated_ok("Itimers"))
+		return -1;
+
 	img = open_image(CR_FD_ITIMERS, O_RSTR, pid);
 	if (!img)
 		return -1;
@@ -2308,6 +2311,9 @@  static int prepare_posix_timers_from_fd(int pid, struct task_restore_args *ta)
 	int ret = -1;
 	struct restore_posix_timer *t;
 
+	if (!deprecated_ok("Posix timers"))
+		return -1;
+
 	img = open_image(CR_FD_POSIX_TIMERS, O_RSTR, pid);
 	if (!img)
 		return -1;
@@ -2498,6 +2504,9 @@  static int prepare_rlimits_from_fd(int pid, struct task_restore_args *ta)
 	int ret;
 	struct cr_img *img;
 
+	if (!deprecated_ok("Rlimits"))
+		return -1;
+
 	/*
 	 * Old image -- read from the file.
 	 */