[PATCH 120] cosmetic, renames

Oleg Nesterov oleg at redhat.com
Mon Oct 26 02:24:11 UTC 2009


Cosmetic changes as you suggested:

	- s/__ptrace_set_options/ptrace_set_events/

	- change the order of arguments in ptrace_set_events()
	  and ptrace_resume() to match utrace API.

---

 kernel/ptrace.c |   21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

--- PU/kernel/ptrace.c~120_RENAMES	2009-10-26 02:48:49.000000000 +0100
+++ PU/kernel/ptrace.c	2009-10-26 03:05:58.000000000 +0100
@@ -177,7 +177,7 @@ ptrace_attach_engine(struct task_struct 
 	return engine;
 }
 
-static inline int __ptrace_set_options(struct task_struct *target,
+static inline int ptrace_set_events(struct task_struct *target,
 					struct utrace_engine *engine,
 					unsigned long options)
 {
@@ -212,7 +212,7 @@ static int ptrace_attach_task(struct tas
 	 * It can fail only if the tracee is dead, the caller
 	 * must notice this before setting PT_UTRACED.
 	 */
-	err = __ptrace_set_options(tracee, engine, options);
+	err = ptrace_set_events(tracee, engine, options);
 	WARN_ON(err && !tracee->exit_state);
 	utrace_engine_put(engine);
 	return 0;
@@ -723,12 +723,12 @@ void exit_ptrace(struct task_struct *tra
 	}
 }
 
-static int ptrace_set_options(struct utrace_engine *engine,
-				struct task_struct *child, long data)
+static int ptrace_set_options(struct task_struct *tracee,
+				struct utrace_engine *engine, long data)
 {
 	BUILD_BUG_ON(PTRACE_O_MASK & PTRACE_O_SYSEMU);
 
-	__ptrace_set_options(child, engine, data & PTRACE_O_MASK);
+	ptrace_set_events(tracee, engine, data & PTRACE_O_MASK);
 	return (data & ~PTRACE_O_MASK) ? -EINVAL : 0;
 }
 
@@ -864,8 +864,9 @@ static int ptrace_resume_action(struct t
 	return action;
 }
 
-static int ptrace_resume(struct utrace_engine *engine,
-			struct task_struct *tracee, long request, long data)
+static int ptrace_resume(struct task_struct *tracee,
+				struct utrace_engine *engine,
+				long request, long data)
 {
 	struct ptrace_context *context = ptrace_context(engine);
 	int action;
@@ -951,7 +952,7 @@ int ptrace_request(struct task_struct *c
 	case PTRACE_OLDSETOPTIONS:
 #endif
 	case PTRACE_SETOPTIONS:
-		ret = ptrace_set_options(engine, child, data);
+		ret = ptrace_set_options(child, engine, data);
 		break;
 	case PTRACE_GETEVENTMSG:
 		ret = put_user(ptrace_context(engine)->eventmsg,
@@ -991,13 +992,13 @@ int ptrace_request(struct task_struct *c
 #endif
 	case PTRACE_SYSCALL:
 	case PTRACE_CONT:
-		ret = ptrace_resume(engine, child, request, data);
+		ret = ptrace_resume(child, engine, request, data);
 		break;
 
 	case PTRACE_KILL:
 		ret = 0;
 		if (!child->exit_state)	/* already dead */
-			ret = ptrace_resume(engine, child, request, SIGKILL);
+			ret = ptrace_resume(child, engine, request, SIGKILL);
 		break;
 
 	default:




More information about the utrace-devel mailing list