Browse Source

Alias sys_getpeername to sys_getsockname

Since parsers for getpeername and getsockname syscalls are identical,
replace sys_getpeername with an alias to sys_getsockname.

* linux/dummy.h (sys_getpeername): Alias to sys_getsockname.
* linux/syscall.h (sys_getpeername): Remove.
* net.c (sys_getpeername): Remove.
Dmitry V. Levin 5 years ago
parent
commit
37548c4afc
3 changed files with 1 additions and 7 deletions
  1. 1
    0
      linux/dummy.h
  2. 0
    1
      linux/syscall.h
  3. 0
    6
      net.c

+ 1
- 0
linux/dummy.h View File

@@ -65,6 +65,7 @@
65 65
 #define	sys_getegid		sys_getuid
66 66
 #define	sys_geteuid		sys_getuid
67 67
 #define	sys_getgid		sys_getuid
68
+#define	sys_getpeername		sys_getsockname
68 69
 #define	sys_getresgid		sys_getresuid
69 70
 #define	sys_lstat		sys_stat
70 71
 #define	sys_lstat64		sys_stat64

+ 0
- 1
linux/syscall.h View File

@@ -103,7 +103,6 @@ int sys_getgroups();
103 103
 int sys_getgroups32();
104 104
 int sys_gethostname();
105 105
 int sys_getitimer();
106
-int sys_getpeername();
107 106
 int sys_getpmsg(); /* TODO: non-Linux, remove? */
108 107
 int sys_getpriority();
109 108
 int sys_getresuid();

+ 0
- 6
net.c View File

@@ -915,12 +915,6 @@ sys_getsockname(struct tcb *tcp)
915 915
 	return do_sockname(tcp, -1);
916 916
 }
917 917
 
918
-int
919
-sys_getpeername(struct tcb *tcp)
920
-{
921
-	return do_sockname(tcp, -1);
922
-}
923
-
924 918
 static int
925 919
 do_pipe(struct tcb *tcp, int flags_arg)
926 920
 {

Loading…
Cancel
Save