[PATCH 08/12] drivers/char/tty_io.c ckpt_write_err->ckpt_err

serue at us.ibm.com serue at us.ibm.com
Mon Nov 2 14:23:36 PST 2009


From: Serge E. Hallyn <serue at us.ibm.com>

Signed-off-by: Serge E. Hallyn <serue at us.ibm.com>
---
 drivers/char/tty_io.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index 1b220c1..5a853a3 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -2622,19 +2622,19 @@ static int tty_can_checkpoint(struct ckpt_ctx *ctx, struct tty_struct *tty)
 {
 	/* only support pty driver */
 	if (tty->driver->type != TTY_DRIVER_TYPE_PTY) {
-		ckpt_write_err(ctx, "TSP", "tty: unknown driverv type %d",
+		ckpt_err(ctx, "%(T)%(S)%(P)tty: unknown driverv type %d\n",
 			       tty->driver, tty, tty->driver->type);
 		return 0;
 	}
 	/* only support unix98 style */
 	if (tty->driver->major != UNIX98_PTY_MASTER_MAJOR &&
 	    tty->driver->major != UNIX98_PTY_SLAVE_MAJOR) {
-		ckpt_write_err(ctx, "TP", "tty: legacy pty", tty);
+		ckpt_err(ctx, "%(T)%(P)tty: legacy pty\n", tty);
 		return 0;
 	}
 	/* only support n_tty ldisc */
 	if (tty->ldisc->ops->num != N_TTY) {
-		ckpt_write_err(ctx, "TSP", "tty: unknown ldisc type %d",
+		ckpt_err(ctx, "%(T)%(S)%(P)tty: unknown ldisc type %d\n",
 			       tty->ldisc->ops, tty, tty->ldisc->ops->num);
 		return 0;
 	}
@@ -2711,7 +2711,7 @@ static int tty_file_collect(struct ckpt_ctx *ctx, struct file *file)
 
 	if (tty->driver->subtype == PTY_TYPE_MASTER) {
 		if (!tty->link) {
-			ckpt_write_err(ctx, "TP", "tty: missing link\n", tty);
+			ckpt_err(ctx, "%(T)%(P)tty: missing link\n\n", tty);
 			return -EIO;
 		}
 		ckpt_debug("collecting slave tty: %p\n", tty->link);
@@ -2735,7 +2735,7 @@ static int checkpoint_tty_ldisc(struct ckpt_ctx *ctx, struct tty_struct *tty)
 	BUG_ON(tty->ldisc->ops->num != N_TTY);
 
 	if ((tty->flags & CKPT_LDISC_FLAGS) != CKPT_LDISC_GOOD) {
-		ckpt_write_err(ctx, "TP", "tty: bad ldisc flags %#lx\n",
+		ckpt_err(ctx, "%(T)%(P)tty: bad ldisc flags %#lx\n",
 			       tty, tty->flags);
 		return -EBUSY;
 	}
@@ -2808,7 +2808,7 @@ static int do_checkpoint_tty(struct ckpt_ctx *ctx, struct tty_struct *tty)
 	int ret;
 
 	if ((tty->flags & (CKPT_TTY_BAD | CKPT_TTY_GOOD)) != CKPT_TTY_GOOD) {
-		ckpt_write_err(ctx, "TP", "tty: bad flags %#lx\n",
+		ckpt_err(ctx, "%(T)%(P)tty: bad flags %#lx\n",
 			       tty, tty->flags);
 		return -EBUSY;
 	}
@@ -3035,7 +3035,7 @@ static struct tty_struct *do_restore_tty(struct ckpt_ctx *ctx)
 	if (master) {
 		file = pty_open_by_index("/dev/ptmx", h->index);
 		if (IS_ERR(file)) {
-			ckpt_write_err(ctx, "TE", "open ptmx", PTR_ERR(file));
+			ckpt_err(ctx, "%(T)%(E)Open ptmx\n", PTR_ERR(file));
 			tty = ERR_PTR(PTR_ERR(file));
 			goto out;
 		}
-- 
1.6.1



More information about the Containers mailing list