X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=Documentation%2Fmtrr.txt;h=c39ac395970ecfa7ee58dada23478c886952a415;hb=3077d78a74a62c5f531b005efdbcc01a3f2f09ca;hp=b78af1c329967adcd5da3c7a9098d351b034645d;hpb=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2;p=~andy%2Flinux diff --git a/Documentation/mtrr.txt b/Documentation/mtrr.txt index b78af1c3299..c39ac395970 100644 --- a/Documentation/mtrr.txt +++ b/Documentation/mtrr.txt @@ -138,19 +138,29 @@ Reading MTRRs from a C program using ioctl()'s: */ #include +#include #include #include #include #include #include #include -#define MTRR_NEED_STRINGS #include #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 ioctl()'s: #include #include #include -#define MTRR_NEED_STRINGS #include #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) {