public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2.4] Make linux/swap.h usable by userspace code.
@ 2004-03-01 14:32 Steven J. Hill
  0 siblings, 0 replies; only message in thread
From: Steven J. Hill @ 2004-03-01 14:32 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 141 bytes --]

Greetings.

This patch allows 'swap.h' to be included by userspace code. AFAIK the
LTP suite is the only code that does this so far.

-Steve

[-- Attachment #2: linux-2.4-swap.h.patch --]
[-- Type: text/x-patch, Size: 689 bytes --]

--- linux/include/linux/swap.h	Fri Jan 23 08:30:29 2004
+++ linux-new/include/linux/swap.h	Mon Mar  1 09:10:44 2004
@@ -1,6 +1,12 @@
 #ifndef _LINUX_SWAP_H
 #define _LINUX_SWAP_H
 
+#include <linux/config.h>
+
+#define MAX_SWAPFILES 32
+
+#ifdef __KERNEL__
+
 #include <linux/spinlock.h>
 #include <asm/page.h>
 
@@ -8,8 +14,6 @@
 #define SWAP_FLAG_PRIO_MASK	0x7fff
 #define SWAP_FLAG_PRIO_SHIFT	0
 
-#define MAX_SWAPFILES 32
-
 /*
  * Magic header for a swap area. The first part of the union is
  * what the swap magic looks like for the old (limited to 128MB)
@@ -38,8 +42,6 @@
 		unsigned int badpages[1];
 	} info;
 };
-
-#ifdef __KERNEL__
 
 /*
  * Max bad pages in the new format..

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-03-01 14:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-01 14:32 [PATCH 2.4] Make linux/swap.h usable by userspace code Steven J. Hill

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox