Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Apr 2015 14:38:59 +0000 (UTC)
From:      Craig Rodrigues <rodrigc@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r281855 - in head/sys: conf dev/bxe dev/mxge geom/uncompress geom/uzip kern libkern net netgraph opencrypto sys
Message-ID:  <201504221438.t3MEcxgW040556@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rodrigc
Date: Wed Apr 22 14:38:58 2015
New Revision: 281855
URL: https://svnweb.freebsd.org/changeset/base/281855

Log:
  Move zlib.c from net to libkern.
  
  It is not network-specific code and would
  be better as part of libkern instead.
  Move zlib.h and zutil.h from net/ to sys/
  Update includes to use sys/zlib.h and sys/zutil.h instead of net/
  
  Submitted by:		Steve Kiernan stevek@juniper.net
  Obtained from:		Juniper Networks, Inc.
  GitHub Pull Request:	https://github.com/freebsd/freebsd/pull/28
  Relnotes:		yes

Added:
  head/sys/libkern/zlib.c   (contents, props changed)
     - copied, changed from r281845, head/sys/net/zlib.c
  head/sys/sys/zlib.h   (contents, props changed)
     - copied, changed from r281845, head/sys/net/zlib.h
  head/sys/sys/zutil.h   (contents, props changed)
     - copied, changed from r281845, head/sys/net/zutil.h
Deleted:
  head/sys/net/zlib.c
  head/sys/net/zlib.h
  head/sys/net/zutil.h
Modified:
  head/sys/conf/files
  head/sys/dev/bxe/bxe.h
  head/sys/dev/mxge/if_mxge.c
  head/sys/geom/uncompress/g_uncompress.c
  head/sys/geom/uzip/g_uzip.c
  head/sys/kern/kern_gzio.c
  head/sys/kern/link_elf.c
  head/sys/kern/link_elf_obj.c
  head/sys/netgraph/ng_deflate.c
  head/sys/opencrypto/cryptodeflate.c
  head/sys/opencrypto/deflate.h

Modified: head/sys/conf/files
==============================================================================
--- head/sys/conf/files	Wed Apr 22 13:52:29 2015	(r281854)
+++ head/sys/conf/files	Wed Apr 22 14:38:58 2015	(r281855)
@@ -3262,6 +3262,9 @@ libkern/strtoul.c		standard
 libkern/strtouq.c		standard
 libkern/strvalid.c		standard
 libkern/timingsafe_bcmp.c	standard
+libkern/zlib.c			optional crypto | geom_uzip | ipsec | \
+					 mxge | netgraph_deflate | \
+					 ddb_ctf | gzio | geom_uncompress
 net/altq/altq_cbq.c		optional altq
 net/altq/altq_cdnr.c		optional altq
 net/altq/altq_hfsc.c		optional altq
@@ -3324,9 +3327,6 @@ net/slcompress.c		optional netgraph_vjc 
 					 netgraph_sppp
 net/toeplitz.c			optional inet rss | inet6 rss
 net/vnet.c			optional vimage
-net/zlib.c			optional crypto | geom_uzip | ipsec | \
-					 mxge | netgraph_deflate | \
-					 ddb_ctf | gzio | geom_uncompress
 net80211/ieee80211.c		optional wlan
 net80211/ieee80211_acl.c	optional wlan wlan_acl
 net80211/ieee80211_action.c	optional wlan

Modified: head/sys/dev/bxe/bxe.h
==============================================================================
--- head/sys/dev/bxe/bxe.h	Wed Apr 22 13:52:29 2015	(r281854)
+++ head/sys/dev/bxe/bxe.h	Wed Apr 22 14:38:58 2015	(r281855)
@@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/limits.h>
 #include <sys/queue.h>
 #include <sys/taskqueue.h>
+#include <sys/zlib.h>
 
 #include <net/if.h>
 #include <net/if_types.h>
@@ -60,7 +61,6 @@ __FBSDID("$FreeBSD$");
 #include <net/if_var.h>
 #include <net/if_media.h>
 #include <net/if_vlan_var.h>
-#include <net/zlib.h>
 #include <net/bpf.h>
 
 #include <netinet/in.h>

Modified: head/sys/dev/mxge/if_mxge.c
==============================================================================
--- head/sys/dev/mxge/if_mxge.c	Wed Apr 22 13:52:29 2015	(r281854)
+++ head/sys/dev/mxge/if_mxge.c	Wed Apr 22 14:38:58 2015	(r281855)
@@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/sysctl.h>
 #include <sys/sx.h>
 #include <sys/taskqueue.h>
+#include <sys/zlib.h>
 
 #include <net/if.h>
 #include <net/if_var.h>
@@ -58,7 +59,6 @@ __FBSDID("$FreeBSD$");
 
 #include <net/if_types.h>
 #include <net/if_vlan_var.h>
-#include <net/zlib.h>
 
 #include <netinet/in_systm.h>
 #include <netinet/in.h>

Modified: head/sys/geom/uncompress/g_uncompress.c
==============================================================================
--- head/sys/geom/uncompress/g_uncompress.c	Wed Apr 22 13:52:29 2015	(r281854)
+++ head/sys/geom/uncompress/g_uncompress.c	Wed Apr 22 14:38:58 2015	(r281855)
@@ -45,10 +45,10 @@ __FBSDID("$FreeBSD$");
 #include <sys/mutex.h>
 #include <sys/malloc.h>
 #include <sys/systm.h>
+#include <sys/zlib.h>
 
 #include <geom/geom.h>
 
-#include <net/zlib.h>
 #include <contrib/xz-embedded/linux/include/linux/xz.h>
 
 #ifdef GEOM_UNCOMPRESS_DEBUG

Modified: head/sys/geom/uzip/g_uzip.c
==============================================================================
--- head/sys/geom/uzip/g_uzip.c	Wed Apr 22 13:52:29 2015	(r281854)
+++ head/sys/geom/uzip/g_uzip.c	Wed Apr 22 14:38:58 2015	(r281855)
@@ -38,9 +38,9 @@ __FBSDID("$FreeBSD$");
 #include <sys/malloc.h>
 #include <sys/sysctl.h>
 #include <sys/systm.h>
+#include <sys/zlib.h>
 
 #include <geom/geom.h>
-#include <net/zlib.h>
 
 FEATURE(geom_uzip, "GEOM uzip read-only compressed disks support");
 

Modified: head/sys/kern/kern_gzio.c
==============================================================================
--- head/sys/kern/kern_gzio.c	Wed Apr 22 13:52:29 2015	(r281854)
+++ head/sys/kern/kern_gzio.c	Wed Apr 22 14:38:58 2015	(r281855)
@@ -32,8 +32,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/gzio.h>
 #include <sys/kernel.h>
 #include <sys/malloc.h>
-
-#include <net/zutil.h>
+#include <sys/zutil.h>
 
 #define	KERN_GZ_HDRLEN		10	/* gzip header length */
 #define	KERN_GZ_TRAILERLEN	8	/* gzip trailer length */

Modified: head/sys/kern/link_elf.c
==============================================================================
--- head/sys/kern/link_elf.c	Wed Apr 22 13:52:29 2015	(r281854)
+++ head/sys/kern/link_elf.c	Wed Apr 22 14:38:58 2015	(r281855)
@@ -66,7 +66,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/link_elf.h>
 
 #ifdef DDB_CTF
-#include <net/zlib.h>
+#include <sys/zlib.h>
 #endif
 
 #include "linker_if.h"

Modified: head/sys/kern/link_elf_obj.c
==============================================================================
--- head/sys/kern/link_elf_obj.c	Wed Apr 22 13:52:29 2015	(r281854)
+++ head/sys/kern/link_elf_obj.c	Wed Apr 22 14:38:58 2015	(r281855)
@@ -60,7 +60,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/link_elf.h>
 
 #ifdef DDB_CTF
-#include <net/zlib.h>
+#include <sys/zlib.h>
 #endif
 
 #include "linker_if.h"

Copied and modified: head/sys/libkern/zlib.c (from r281845, head/sys/net/zlib.c)
==============================================================================
--- head/sys/net/zlib.c	Wed Apr 22 01:54:25 2015	(r281845, copy source)
+++ head/sys/libkern/zlib.c	Wed Apr 22 14:38:58 2015	(r281855)
@@ -54,7 +54,7 @@
 #define _Z_UTIL_H
 
 #ifdef _KERNEL
-#include <net/zlib.h>
+#include <sys/zlib.h>
 #else
 #include "zlib.h"
 #endif

Modified: head/sys/netgraph/ng_deflate.c
==============================================================================
--- head/sys/netgraph/ng_deflate.c	Wed Apr 22 13:52:29 2015	(r281854)
+++ head/sys/netgraph/ng_deflate.c	Wed Apr 22 14:38:58 2015	(r281855)
@@ -39,8 +39,7 @@
 #include <sys/endian.h>
 #include <sys/errno.h>
 #include <sys/syslog.h>
-
-#include <net/zlib.h>
+#include <sys/zlib.h>
 
 #include <netgraph/ng_message.h>
 #include <netgraph/netgraph.h>

Modified: head/sys/opencrypto/cryptodeflate.c
==============================================================================
--- head/sys/opencrypto/cryptodeflate.c	Wed Apr 22 13:52:29 2015	(r281854)
+++ head/sys/opencrypto/cryptodeflate.c	Wed Apr 22 14:38:58 2015	(r281855)
@@ -29,7 +29,7 @@
 
 /*
  * This file contains a wrapper around the deflate algo compression
- * functions using the zlib library (see net/zlib.{c,h})
+ * functions using the zlib library (see libkern/zlib.c and sys/zlib.h})
  */
 
 #include <sys/cdefs.h>
@@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/kernel.h>
 #include <sys/sdt.h>
 #include <sys/systm.h>
-#include <net/zlib.h>
+#include <sys/zlib.h>
 
 #include <opencrypto/cryptodev.h>
 #include <opencrypto/deflate.h>

Modified: head/sys/opencrypto/deflate.h
==============================================================================
--- head/sys/opencrypto/deflate.h	Wed Apr 22 13:52:29 2015	(r281854)
+++ head/sys/opencrypto/deflate.h	Wed Apr 22 14:38:58 2015	(r281855)
@@ -36,7 +36,7 @@
 #ifndef _CRYPTO_DEFLATE_H_
 #define _CRYPTO_DEFLATE_H_
 
-#include <net/zlib.h>
+#include <sys/zlib.h>
 
 #define Z_METHOD	8
 #define Z_MEMLEVEL	8

Copied and modified: head/sys/sys/zlib.h (from r281845, head/sys/net/zlib.h)
==============================================================================

Copied and modified: head/sys/sys/zutil.h (from r281845, head/sys/net/zutil.h)
==============================================================================
--- head/sys/net/zutil.h	Wed Apr 22 01:54:25 2015	(r281845, copy source)
+++ head/sys/sys/zutil.h	Wed Apr 22 14:38:58 2015	(r281855)
@@ -17,7 +17,7 @@
 #define ZEXPORT
 
 #ifdef _KERNEL
-#include <net/zlib.h>
+#include <sys/zlib.h>
 #else
 #include "zlib.h"
 #endif



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