From: "Randy.Dunlap" <rddunlap@osdl.org>
To: blaisorblade_spam@yahoo.it
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org,
user-mode-linux-devel@lists.sourceforge.net, jdike@addtoit.com
Subject: Re: [patch 1/1] uml: fix some ptrace functions returns values
Date: Tue, 23 Nov 2004 18:50:30 -0800 [thread overview]
Message-ID: <41A3F6F6.1040903@osdl.org> (raw)
In-Reply-To: <20041124000715.E3A2FAB24@zion.localdomain>
blaisorblade_spam@yahoo.it wrote:
> From: Jeff Dike <jdike@addtoit.com>
>
> This patch adds ptrace_setfpregs and makes these functions return -errno on
> failure.
>
> Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>
> ---
>
> linux-2.6.10-rc-paolo/arch/um/sys-i386/ptrace_user.c | 19 ++++++++++++++++---
> 1 files changed, 16 insertions(+), 3 deletions(-)
>
> diff -puN arch/um/sys-i386/ptrace_user.c~uml-fix-ptrace-interfaces arch/um/sys-i386/ptrace_user.c
> --- linux-2.6.10-rc/arch/um/sys-i386/ptrace_user.c~uml-fix-ptrace-interfaces 2004-11-24 01:06:35.525806848 +0100
> +++ linux-2.6.10-rc-paolo/arch/um/sys-i386/ptrace_user.c 2004-11-24 01:06:35.528806392 +0100
> @@ -17,17 +17,30 @@
>
> int ptrace_getregs(long pid, unsigned long *regs_out)
> {
> - return(ptrace(PTRACE_GETREGS, pid, 0, regs_out));
> + if(ptrace(PTRACE_GETREGS, pid, 0, regs_out) < 0)
> + return(-errno);
> + return(0);
> }
>
> int ptrace_setregs(long pid, unsigned long *regs)
> {
> - return(ptrace(PTRACE_SETREGS, pid, 0, regs));
> + if(ptrace(PTRACE_SETREGS, pid, 0, regs) < 0)
> + return(-errno);
> + return(0);
> }
>
> int ptrace_getfpregs(long pid, unsigned long *regs)
> {
> - return(ptrace(PTRACE_GETFPREGS, pid, 0, regs));
> + if(ptrace(PTRACE_GETFPREGS, pid, 0, regs) < 0)
> + return(-errno);
> + return(0);
> +}
> +
> +int ptrace_setfpregs(long pid, unsigned long *regs)
> +{
> + if(ptrace(PTRACE_SETFPREGS, pid, 0, regs) < 0)
> + return(-errno);
> + return(0);
> }
>
> static void write_debugregs(int pid, unsigned long *regs)
Looks OK except that someone's SPACEBAR is broken (missing)
and there are (unneeded/unwanted) parens on the returns.
--
~Randy
next prev parent reply other threads:[~2004-11-24 2:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-24 0:07 [patch 1/1] uml: fix some ptrace functions returns values blaisorblade_spam
2004-11-24 2:50 ` Randy.Dunlap [this message]
2004-11-25 4:14 ` [uml-devel] " Blaisorblade
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=41A3F6F6.1040903@osdl.org \
--to=rddunlap@osdl.org \
--cc=akpm@osdl.org \
--cc=blaisorblade_spam@yahoo.it \
--cc=jdike@addtoit.com \
--cc=linux-kernel@vger.kernel.org \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/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