[PATCH 1/2] sh: Remove unsupported accept4 syscall

Carmelo AMOROSO carmelo.amoroso at st.com
Mon Dec 13 07:37:26 UTC 2010


* linux/sh/syscallent.h: Remove the entry for accept4. Adjust
the check for SYS_ipc_subcall and update ipc syscall numbers
accordingly in the comment.
* linux/syscall.h [SH]: Do not define SYS_sub_accept4 and update
SYS_socket_nsubcalls accordingly.

Signed-off-by: Carmelo Amoroso <carmelo.amoroso at st.com>
---
 linux/sh/syscallent.h |   35 +++++++++++++++++------------------
 linux/syscall.h       |    7 ++++++-
 2 files changed, 23 insertions(+), 19 deletions(-)

diff --git a/linux/sh/syscallent.h b/linux/sh/syscallent.h
index f3b59db..a778639 100644
--- a/linux/sh/syscallent.h
+++ b/linux/sh/syscallent.h
@@ -454,35 +454,34 @@
 	{ 5,	TN,	sys_getsockopt,		"getsockopt"	}, /* 415 */
 	{ 5,	TN,	sys_sendmsg,		"sendmsg"	}, /* 416 */
 	{ 5,	TN,	sys_recvmsg,		"recvmsg"	}, /* 417 */
-	{ 4,	TN,	sys_accept4,		"accept4"	}, /* 418 */
-	{ 5,	TN,	sys_recvmmsg,		"recvmmsg"	}, /* 419 */
+	{ 5,	TN,	sys_recvmmsg,		"recvmmsg"	}, /* 418 */
 
-#if SYS_ipc_subcall != 420
+#if SYS_ipc_subcall != 419
  #error fix me
 #endif
 
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 420 */
-	{ 4,	TI,	sys_semop,		"semop"		}, /* 421 */
-	{ 4,	TI,	sys_semget,		"semget"	}, /* 422 */
-	{ 4,	TI,	sys_semctl,		"semctl"	}, /* 423 */
-	{ 5,	TI,	sys_semtimedop,		"semtimedop"	}, /* 424 */
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 419 */
+	{ 4,	TI,	sys_semop,		"semop"		}, /* 420 */
+	{ 4,	TI,	sys_semget,		"semget"	}, /* 421 */
+	{ 4,	TI,	sys_semctl,		"semctl"	}, /* 422 */
+	{ 5,	TI,	sys_semtimedop,		"semtimedop"	}, /* 423 */
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 424 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 425 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 426 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 427 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 428 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 429 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 430 */
-	{ 4,	TI,	sys_msgsnd,		"msgsnd"	}, /* 431 */
-	{ 4,	TI,	sys_msgrcv,		"msgrcv"	}, /* 432 */
-	{ 4,	TI,	sys_msgget,		"msgget"	}, /* 433 */
-	{ 4,	TI,	sys_msgctl,		"msgctl"	}, /* 434 */
+	{ 4,	TI,	sys_msgsnd,		"msgsnd"	}, /* 430 */
+	{ 4,	TI,	sys_msgrcv,		"msgrcv"	}, /* 431 */
+	{ 4,	TI,	sys_msgget,		"msgget"	}, /* 432 */
+	{ 4,	TI,	sys_msgctl,		"msgctl"	}, /* 433 */
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 434 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 435 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 436 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 437 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 438 */
 	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 439 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 440 */
-	{ 4,	TI,	sys_shmat,		"shmat"		}, /* 441 */
-	{ 4,	TI,	sys_shmdt,		"shmdt"		}, /* 442 */
-	{ 4,	TI,	sys_shmget,		"shmget"	}, /* 443 */
-	{ 4,	TI,	sys_shmctl,		"shmctl"	}, /* 444 */
+	{ 4,	TI,	sys_shmat,		"shmat"		}, /* 440 */
+	{ 4,	TI,	sys_shmdt,		"shmdt"		}, /* 441 */
+	{ 4,	TI,	sys_shmget,		"shmget"	}, /* 442 */
+	{ 4,	TI,	sys_shmctl,		"shmctl"	}, /* 443 */
diff --git a/linux/syscall.h b/linux/syscall.h
index e7348ff..5ef722e 100644
--- a/linux/syscall.h
+++ b/linux/syscall.h
@@ -228,10 +228,15 @@ int sys_osf_utimes();
 #define SYS_sub_getsockopt	(SYS_socket_subcall + 15)
 #define SYS_sub_sendmsg		(SYS_socket_subcall + 16)
 #define SYS_sub_recvmsg		(SYS_socket_subcall + 17)
+# ifndef SH
 #define SYS_sub_accept4		(SYS_socket_subcall + 18)
 #define SYS_sub_recvmmsg	(SYS_socket_subcall + 19)
-
 #define SYS_socket_nsubcalls	20
+# else
+/* SH does not have accept4 at all */
+#define SYS_sub_recvmmsg	(SYS_socket_subcall + 18)
+#define SYS_socket_nsubcalls	19
+# endif
 #endif /* !(ALPHA || MIPS || HPPA) */
 
 /* sys_ipc subcalls */
-- 
1.5.5.6




More information about the Strace-devel mailing list