lkml.org 
[lkml]   [2006]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH] Doc; fix mtrr userspace programs to build cleanly
    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)
    {

    ---
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2006-04-05 05:20    [W:3.422 / U:0.064 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site