[Devel] [PATCH 3/3] use ckpt_err in ckpt_read_obj_type()
Serge Hallyn
serge at us.ibm.com
Mon Nov 16 13:01:53 PST 2009
From: Serge E. Hallyn <serue at us.ibm.com>
Signed-off-by: Serge E. Hallyn <serue at us.ibm.com>
---
checkpoint/restart.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/checkpoint/restart.c b/checkpoint/restart.c
index 4af4647..b684d7a 100644
--- a/checkpoint/restart.c
+++ b/checkpoint/restart.c
@@ -416,11 +416,16 @@ void *ckpt_read_obj_type(struct ckpt_ctx *ctx, int len, int type)
BUG_ON(!len);
h = ckpt_read_obj(ctx, len, len);
- if (IS_ERR(h))
+ if (IS_ERR(h)) {
+ ckpt_err(ctx, PTR_ERR(h), "Looking for type %d in ckptfile\n",
+ type);
return h;
+ }
if (h->type != type) {
ckpt_hdr_put(ctx, h);
+ ckpt_err(ctx, -EINVAL, "Next object was type %d, not %d\n",
+ h->type, type);
h = ERR_PTR(-EINVAL);
}
--
1.6.1
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list