OpenVZ Forum


Home » Mailing lists » Devel » [PATCH]: Propagate error code from devpts_pty_new
[PATCH]: Propagate error code from devpts_pty_new [message #29549] Wed, 16 April 2008 22:15 Go to next message
Sukadev Bhattiprolu is currently offline  Sukadev Bhattiprolu
Messages: 413
Registered: August 2006
Senior Member
From: Sukadev Bhattiprolu <sukadev@us.ibm.com>
Subject: [PATCH]: Propagate error code from devpts_pty_new

Have ptmx_open() propagate any error code returned by devpts_pty_new()
(which returns either 0 or -ENOMEM anyway).

Signed-off-by: Sukadev Bhattiprolu <sukadev@us.ibm.com>
---
 drivers/char/tty_io.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: 2.6.25-rc8-mm2/drivers/char/tty_io.c
===================================================================
--- 2.6.25-rc8-mm2.orig/drivers/char/tty_io.c	2008-04-16 09:38:23.000000000 -0700
+++ 2.6.25-rc8-mm2/drivers/char/tty_io.c	2008-04-16 09:51:11.000000000 -0700
@@ -2835,8 +2835,8 @@ static int ptmx_open(struct inode *inode
 	filp->private_data = tty;
 	file_move(filp, &tty->tty_files);
 
-	retval = -ENOMEM;
-	if (devpts_pty_new(tty->link))
+	retval = devpts_pty_new(tty->link);
+	if (retval)
 		goto out1;
 
 	check_tty_count(tty, "tty_open");
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Re: [PATCH]: Propagate error code from devpts_pty_new [message #29585 is a reply to message #29549] Thu, 17 April 2008 15:37 Go to previous messageGo to next message
serue is currently offline  serue
Messages: 750
Registered: February 2006
Senior Member
Quoting sukadev@us.ibm.com (sukadev@us.ibm.com):
> From: Sukadev Bhattiprolu <sukadev@us.ibm.com>
> Subject: [PATCH]: Propagate error code from devpts_pty_new
> 
> Have ptmx_open() propagate any error code returned by devpts_pty_new()
> (which returns either 0 or -ENOMEM anyway).
> 
> Signed-off-by: Sukadev Bhattiprolu <sukadev@us.ibm.com>

Seems nice and non-contentuous.

Acked-by: Serge Hallyn <serue@us.ibm.com>

thanks,
-serge

> ---
>  drivers/char/tty_io.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> Index: 2.6.25-rc8-mm2/drivers/char/tty_io.c
> ===================================================================
> --- 2.6.25-rc8-mm2.orig/drivers/char/tty_io.c	2008-04-16 09:38:23.000000000 -0700
> +++ 2.6.25-rc8-mm2/drivers/char/tty_io.c	2008-04-16 09:51:11.000000000 -0700
> @@ -2835,8 +2835,8 @@ static int ptmx_open(struct inode *inode
>  	filp->private_data = tty;
>  	file_move(filp, &tty->tty_files);
> 
> -	retval = -ENOMEM;
> -	if (devpts_pty_new(tty->link))
> +	retval = devpts_pty_new(tty->link);
> +	if (retval)
>  		goto out1;
> 
>  	check_tty_count(tty, "tty_open");
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Re: [PATCH]: Propagate error code from devpts_pty_new [message #29587 is a reply to message #29585] Thu, 17 April 2008 16:05 Go to previous message
hpa is currently offline  hpa
Messages: 38
Registered: January 2007
Member
Serge E. Hallyn wrote:
> Quoting sukadev@us.ibm.com (sukadev@us.ibm.com):
>> From: Sukadev Bhattiprolu <sukadev@us.ibm.com>
>> Subject: [PATCH]: Propagate error code from devpts_pty_new
>>
>> Have ptmx_open() propagate any error code returned by devpts_pty_new()
>> (which returns either 0 or -ENOMEM anyway).
>>
>> Signed-off-by: Sukadev Bhattiprolu <sukadev@us.ibm.com>
> 
> Seems nice and non-contentuous.
> 
> Acked-by: Serge Hallyn <serue@us.ibm.com>

Acked-by: H. Peter Anvin <hpa@zytor.com>
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Previous Topic: vmalloc size (trobles with nvidia-glx)
Next Topic: Re: [PATCH] eCryptfs: Make key module subsystem respect namespaces
Goto Forum:
  


Current Time: Mon Jul 15 12:56:47 GMT 2024

Total time taken to generate the page: 0.02364 seconds