summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordchagin <dchagin@FreeBSD.org>2015-05-24 18:03:14 +0000
committerdchagin <dchagin@FreeBSD.org>2015-05-24 18:03:14 +0000
commit8164e611225c5a6b15de4212046931832b10ce88 (patch)
tree46d164d705263a70bcd7dcbbadfd36c08decca35
parent791c259f2875f288ddf60ed0343ad78ace2c6071 (diff)
downloadFreeBSD-src-8164e611225c5a6b15de4212046931832b10ce88.zip
FreeBSD-src-8164e611225c5a6b15de4212046931832b10ce88.tar.gz
Reduce duplication between MD Linux code by moving msg related
struct definitions out into the compat/linux/linux_socket.h
-rw-r--r--sys/amd64/linux/linux.h16
-rw-r--r--sys/amd64/linux32/linux.h16
-rw-r--r--sys/compat/linux/linux_socket.h16
-rw-r--r--sys/i386/linux/linux.h16
4 files changed, 16 insertions, 48 deletions
diff --git a/sys/amd64/linux/linux.h b/sys/amd64/linux/linux.h
index 29c2525..c4fe9ae 100644
--- a/sys/amd64/linux/linux.h
+++ b/sys/amd64/linux/linux.h
@@ -447,22 +447,6 @@ struct l_sockaddr {
char sa_data[14];
};
-struct l_msghdr {
- l_uintptr_t msg_name;
- l_int msg_namelen;
- l_uintptr_t msg_iov;
- l_size_t msg_iovlen;
- l_uintptr_t msg_control;
- l_size_t msg_controllen;
- l_uint msg_flags;
-};
-
-struct l_cmsghdr {
- l_size_t cmsg_len;
- l_int cmsg_level;
- l_int cmsg_type;
-};
-
struct l_ifmap {
l_ulong mem_start;
l_ulong mem_end;
diff --git a/sys/amd64/linux32/linux.h b/sys/amd64/linux32/linux.h
index 82fe748..e3b9f11 100644
--- a/sys/amd64/linux32/linux.h
+++ b/sys/amd64/linux32/linux.h
@@ -525,22 +525,6 @@ struct l_sockaddr {
char sa_data[14];
} __packed;
-struct l_msghdr {
- l_uintptr_t msg_name;
- l_int msg_namelen;
- l_uintptr_t msg_iov;
- l_size_t msg_iovlen;
- l_uintptr_t msg_control;
- l_size_t msg_controllen;
- l_uint msg_flags;
-};
-
-struct l_cmsghdr {
- l_size_t cmsg_len;
- l_int cmsg_level;
- l_int cmsg_type;
-};
-
struct l_ifmap {
l_ulong mem_start;
l_ulong mem_end;
diff --git a/sys/compat/linux/linux_socket.h b/sys/compat/linux/linux_socket.h
index 5eea003..6ee78ee 100644
--- a/sys/compat/linux/linux_socket.h
+++ b/sys/compat/linux/linux_socket.h
@@ -55,6 +55,22 @@
#define LINUX_SCM_RIGHTS 0x01
#define LINUX_SCM_CREDENTIALS 0x02
+struct l_msghdr {
+ l_uintptr_t msg_name;
+ l_int msg_namelen;
+ l_uintptr_t msg_iov;
+ l_size_t msg_iovlen;
+ l_uintptr_t msg_control;
+ l_size_t msg_controllen;
+ l_uint msg_flags;
+};
+
+struct l_cmsghdr {
+ l_size_t cmsg_len;
+ l_int cmsg_level;
+ l_int cmsg_type;
+};
+
/* Ancilliary data object information macros */
#define LINUX_CMSG_ALIGN(len) roundup2(len, sizeof(l_ulong))
diff --git a/sys/i386/linux/linux.h b/sys/i386/linux/linux.h
index 97493e2..36b2084 100644
--- a/sys/i386/linux/linux.h
+++ b/sys/i386/linux/linux.h
@@ -504,22 +504,6 @@ struct l_sockaddr {
char sa_data[14];
};
-struct l_msghdr {
- l_uintptr_t msg_name;
- l_int msg_namelen;
- l_uintptr_t msg_iov;
- l_size_t msg_iovlen;
- l_uintptr_t msg_control;
- l_size_t msg_controllen;
- l_uint msg_flags;
-};
-
-struct l_cmsghdr {
- l_size_t cmsg_len;
- l_int cmsg_level;
- l_int cmsg_type;
-};
-
struct l_ifmap {
l_ulong mem_start;
l_ulong mem_end;
OpenPOWER on IntegriCloud