Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 May 2009 09:39:20 +0000 (UTC)
From:      Dmitry Chagin <dchagin@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r191876 - in head/sys: amd64/linux32 compat/linux i386/linux
Message-ID:  <200905070939.n479dKUg048030@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dchagin
Date: Thu May  7 09:39:20 2009
New Revision: 191876
URL: http://svn.freebsd.org/changeset/base/191876

Log:
  To avoid excessive code duplication move MI definitions to the MI
  header file. As it is defined in Linux.
  
  Approved by:	kib (mentor)
  MFC after:	1 month

Modified:
  head/sys/amd64/linux32/linux.h
  head/sys/compat/linux/linux_ioctl.c
  head/sys/compat/linux/linux_socket.h
  head/sys/i386/linux/linux.h

Modified: head/sys/amd64/linux32/linux.h
==============================================================================
--- head/sys/amd64/linux32/linux.h	Thu May  7 09:34:02 2009	(r191875)
+++ head/sys/amd64/linux32/linux.h	Thu May  7 09:39:20 2009	(r191876)
@@ -669,14 +669,6 @@ union l_semun {
 #define	LINUX_SENDMSG		16
 #define	LINUX_RECVMSG		17
 
-#define	LINUX_AF_UNSPEC		0
-#define	LINUX_AF_UNIX		1
-#define	LINUX_AF_INET		2
-#define	LINUX_AF_AX25		3
-#define	LINUX_AF_IPX		4
-#define	LINUX_AF_APPLETALK	5
-#define	LINUX_AF_INET6		10
-
 #define	LINUX_SOL_SOCKET	1
 #define	LINUX_SOL_IP		0
 #define	LINUX_SOL_IPX		256

Modified: head/sys/compat/linux/linux_ioctl.c
==============================================================================
--- head/sys/compat/linux/linux_ioctl.c	Thu May  7 09:34:02 2009	(r191875)
+++ head/sys/compat/linux/linux_ioctl.c	Thu May  7 09:39:20 2009	(r191876)
@@ -77,6 +77,7 @@ __FBSDID("$FreeBSD$");
 
 #include <compat/linux/linux_ioctl.h>
 #include <compat/linux/linux_mib.h>
+#include <compat/linux/linux_socket.h>
 #include <compat/linux/linux_util.h>
 
 CTASSERT(LINUX_IFNAMSIZ == IFNAMSIZ);

Modified: head/sys/compat/linux/linux_socket.h
==============================================================================
--- head/sys/compat/linux/linux_socket.h	Thu May  7 09:34:02 2009	(r191875)
+++ head/sys/compat/linux/linux_socket.h	Thu May  7 09:39:20 2009	(r191876)
@@ -80,4 +80,14 @@
 #define CMSG_HDRSZ		CMSG_LEN(0)
 #define L_CMSG_HDRSZ		LINUX_CMSG_LEN(0)
 
+/* Supported address families */
+
+#define	LINUX_AF_UNSPEC		0
+#define	LINUX_AF_UNIX		1
+#define	LINUX_AF_INET		2
+#define	LINUX_AF_AX25		3
+#define	LINUX_AF_IPX		4
+#define	LINUX_AF_APPLETALK	5
+#define	LINUX_AF_INET6		10
+
 #endif /* _LINUX_SOCKET_H_ */

Modified: head/sys/i386/linux/linux.h
==============================================================================
--- head/sys/i386/linux/linux.h	Thu May  7 09:34:02 2009	(r191875)
+++ head/sys/i386/linux/linux.h	Thu May  7 09:39:20 2009	(r191876)
@@ -645,14 +645,6 @@ union l_semun {
 #define	LINUX_SENDMSG		16
 #define	LINUX_RECVMSG		17
 
-#define	LINUX_AF_UNSPEC		0
-#define	LINUX_AF_UNIX		1
-#define	LINUX_AF_INET		2
-#define	LINUX_AF_AX25		3
-#define	LINUX_AF_IPX		4
-#define	LINUX_AF_APPLETALK	5
-#define	LINUX_AF_INET6		10
-
 #define	LINUX_SOL_SOCKET	1
 #define	LINUX_SOL_IP		0
 #define	LINUX_SOL_IPX		256



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905070939.n479dKUg048030>