Skip to contentSkip to conversation

hide kernel includes in include/linux/nfs.h

PATCH In review Olaf Hering 2 participants 2 messages Feb 20, 2005 – Feb 21, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hide kernel includes in include/linux/nfs.h

msg_prot.h and string.h have both kernel only content. I want to get to the point were klibc can be shipped standalone with only a few required headers. This patch shrinks the header file list to include. It changes also a #ifdef, so unifdef can do its job.

include/linux/nfs.h +5 -4
diff -purN linux-2.6.11-rc4.orig/include/linux/nfs.h linux-2.6.11-rc4-klibc/include/linux/nfs.h
@@ -7,9 +7,6 @@
 #ifndef _LINUX_NFS_H
 #define _LINUX_NFS_H
 
-#include <linux/sunrpc/msg_prot.h>
-#include <linux/string.h>
-
 #define NFS_PROGRAM	100003
 #define NFS_PORT	2049
 #define NFS_MAXDATA	8192
@@ -129,7 +126,11 @@ enum nfs_ftype {
 	NFFIFO = 8
 };
 
-#if defined(__KERNEL__)
+#ifdef __KERNEL__
+
+#include <linux/sunrpc/msg_prot.h>
+#include <linux/string.h>
+
 /*
  * This is the kernel NFS client file handle representation
  */

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

#1 lore raw

There is really no good reason why nfs.h should be including those two files in the first place. Let's just throw them out altogether.

The other such cleanup we want to do is to move the definition of "struct nfs_fh" into one of the NFS client-specific header files.

Cheers,
Trond

su den 20.02.2005 Klokka 22:36 (+0100) skreiv Olaf Hering:

Quoted 44 lines

msg_prot.h and string.h have both kernel only content. I want to get to the point were klibc can be shipped standalone with only a few required headers. This patch shrinks the header file list to include. It changes also a #ifdef, so unifdef can do its job.

diff -purN linux-2.6.11-rc4.orig/include/linux/nfs.h linux-2.6.11-rc4-klibc/include/linux/nfs.h

include/linux/nfs.h +5 -5
@@ -7,9 +7,6 @@
 #ifndef _LINUX_NFS_H
 #define _LINUX_NFS_H
 
-#include <linux/sunrpc/msg_prot.h>
-#include <linux/string.h>
-
 #define NFS_PROGRAM	100003
 #define NFS_PORT	2049
 #define NFS_MAXDATA	8192
@@ -129,7 +126,11 @@ enum nfs_ftype {
 	NFFIFO = 8
 };
 
-#if defined(__KERNEL__)
+#ifdef __KERNEL__
+
+#include <linux/sunrpc/msg_prot.h>
+#include <linux/string.h>
+
 /*
  * This is the kernel NFS client file handle representation
  */
 
 
-------------------------------------------------------

SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs

Signature · 12 lines
Trond Myklebust <[email protected]>



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
NFS maillist  -  [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs