Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 25522
b: refs/heads/master
c: 235963b
h: refs/heads/master
v: v3
  • Loading branch information
Randy Dunlap authored and Linus Torvalds committed Apr 11, 2006
1 parent e34d3f1 commit b38dfae
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8c37bea1a0506f45111c64bac4325173e066b22d
refs/heads/master: 235963b2edc080b577000031b9ad75804dd83c88
23 changes: 21 additions & 2 deletions trunk/Documentation/mtrr.txt
Original file line number Diff line number Diff line change
Expand Up @@ -138,19 +138,29 @@ Reading MTRRs from a C program using ioctl()'s:

*/
#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 ()
{
Expand Down Expand Up @@ -232,13 +242,22 @@ Creating MTRRs from a C programme using ioctl()'s:
#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)
{
Expand Down

0 comments on commit b38dfae

Please sign in to comment.