From: "Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
To: Linux Containers <containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org>
Subject: [PATCH trivial] pty: set tty on error
Date: Fri, 18 Sep 2009 10:55:07 -0500 [thread overview]
Message-ID: <20090918155507.GA1329@us.ibm.com> (raw)
we always return tty expecting it to hold the error code.
Signed-off-by: Serge E. Hallyn <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
---
drivers/char/tty_io.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index 1729b2f..ee95938 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -3033,8 +3033,12 @@ 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))
+ if (IS_ERR(file)) {
+ ckpt_write_err(ctx, "TE", "Error %d opening /dev/ptmx",
+ PTR_ERR(file));
+ tty = ERR_PTR(PTR_ERR(file));
goto out;
+ }
/*
* Add file to objhash to ensure proper cleanup later
--
1.6.1
next reply other threads:[~2009-09-18 15:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-18 15:55 Serge E. Hallyn [this message]
[not found] ` <20090918155507.GA1329-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-09-18 17:00 ` [PATCH trivial] pty: set tty on error Oren Laadan
2009-09-18 17:21 ` Oren Laadan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090918155507.GA1329@us.ibm.com \
--to=serue-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
--cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox