mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Use decimal for PTRACE_ATTACH and PTRACE_DETACH.
@ 2006-08-18  6:53 Roland McGrath
  0 siblings, 0 replies; only message in thread
From: Roland McGrath @ 2006-08-18  6:53 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: David Miller, linux-kernel

It is sure confusing that linux/ptrace.h has:
	#define PTRACE_SINGLESTEP	   9
	#define PTRACE_ATTACH		0x10
	#define PTRACE_DETACH		0x11
	#define PTRACE_SYSCALL		  24
All the low-numbered constants are in decimal, but the last two in hex.
It sure makes it likely that someone will look at this and think that
9, 10, 11 are used, and that 16 and 17 are not used.

How about we use the same notation for all the numbers [0,24] in the
same short list?

Signed-off-by: Roland McGrath <roland@redhat.com>
---
 include/linux/ptrace.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h
index 8b2749a..eeb1976 100644  
--- a/include/linux/ptrace.h
+++ b/include/linux/ptrace.h
@@ -16,8 +16,8 @@
 #define PTRACE_KILL		   8
 #define PTRACE_SINGLESTEP	   9
 
-#define PTRACE_ATTACH		0x10
-#define PTRACE_DETACH		0x11
+#define PTRACE_ATTACH		  16
+#define PTRACE_DETACH		  17
 
 #define PTRACE_SYSCALL		  24
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-08-18  6:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-18  6:53 [PATCH] Use decimal for PTRACE_ATTACH and PTRACE_DETACH Roland McGrath

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®