mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Doc; fix mtrr userspace programs to build cleanly
@ 2006-04-05  3:15 Randy.Dunlap
  2006-04-05 10:22 ` Xavier Bestel
  0 siblings, 1 reply; 2+ messages in thread
From: Randy.Dunlap @ 2006-04-05  3:15 UTC (permalink / raw)
  To: lkml; +Cc: rgooch, akpm

From: Randy Dunlap <rdunlap@xenotime.net>

Fix mtrr-add.c and mtrr-show.c in Doc/mtrr.txt to build cleanly.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
---
 Documentation/mtrr.txt |   23 +++++++++++++++++++++--
 1 files changed, 21 insertions(+), 2 deletions(-)

--- linux-2617-rc1-docsrc.orig/Documentation/mtrr.txt
+++ linux-2617-rc1-docsrc/Documentation/mtrr.txt
@@ -138,19 +138,29 @@ Reading MTRRs from a C program using ioc
 
 */
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <sys/ioctl.h>
 #include <errno.h>
-#define MTRR_NEED_STRINGS
 #include <asm/mtrr.h>
 
 #define TRUE 1
 #define FALSE 0
 #define ERRSTRING strerror (errno)
 
+static char *mtrr_strings[MTRR_NUM_TYPES] =
+{
+    "uncachable",               /* 0 */
+    "write-combining",          /* 1 */
+    "?",                        /* 2 */
+    "?",                        /* 3 */
+    "write-through",            /* 4 */
+    "write-protect",            /* 5 */
+    "write-back",               /* 6 */
+};
 
 int main ()
 {
@@ -232,13 +242,22 @@ Creating MTRRs from a C programme using 
 #include <fcntl.h>
 #include <sys/ioctl.h>
 #include <errno.h>
-#define MTRR_NEED_STRINGS
 #include <asm/mtrr.h>
 
 #define TRUE 1
 #define FALSE 0
 #define ERRSTRING strerror (errno)
 
+static char *mtrr_strings[MTRR_NUM_TYPES] =
+{
+    "uncachable",               /* 0 */
+    "write-combining",          /* 1 */
+    "?",                        /* 2 */
+    "?",                        /* 3 */
+    "write-through",            /* 4 */
+    "write-protect",            /* 5 */
+    "write-back",               /* 6 */
+};
 
 int main (int argc, char **argv)
 {


---

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-04-05 10:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-05  3:15 [PATCH] Doc; fix mtrr userspace programs to build cleanly Randy.Dunlap
2006-04-05 10:22 ` Xavier Bestel

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

all inboxes | Powered by JetHome®