Remove unused code

* configure.ac (AC_CHECK_TYPES): Remove struct opthdr and
struct t_opthdr.
* net.c (print_sock_optmgmt): Remove.
This commit is contained in:
Дмитрий Левин 2013-11-12 15:39:09 +00:00
parent e2de3bdd12
commit 70e84c4e25
2 changed files with 0 additions and 37 deletions

View File

@ -195,8 +195,6 @@ AC_CHECK_MEMBERS([struct sockaddr_in6.sin6_scope_id],,,
#include <netinet/in.h>])
AC_LITTLE_ENDIAN_LONG_LONG
AC_OFF_T_IS_LONG_LONG
AC_CHECK_TYPES([struct opthdr],,, [#include <sys/socket.h>])
AC_CHECK_TYPES([struct t_opthdr],,, [#include <sys/tiuser.h>])
AC_CHECK_FUNCS(m4_normalize([
fork

35
net.c
View File

@ -2287,41 +2287,6 @@ printsockopt(struct tcb *tcp, int level, int name, long addr, int len)
return 0;
}
#ifdef HAVE_STRUCT_OPTHDR
void
print_sock_optmgmt(struct tcb *tcp, long addr, int len)
{
int c = 0;
struct opthdr hdr;
while (len >= (int) sizeof hdr) {
if (umove(tcp, addr, &hdr) < 0) break;
if (c++) {
tprints(", ");
}
else if (len > hdr.len + sizeof hdr) {
tprints("[");
}
tprints("{");
addr += sizeof hdr;
len -= sizeof hdr;
printsockopt(tcp, hdr.level, hdr.name, addr, hdr.len);
if (hdr.len > 0) {
addr += hdr.len;
len -= hdr.len;
}
tprints("}");
}
if (len > 0) {
if (c++) tprints(", ");
printstr(tcp, addr, len);
}
if (c > 1) tprints("]");
}
#endif
int
sys_setsockopt(struct tcb *tcp)
{