const char* to char* update in console.h

const char* to char* update in console.h

Post by Rusty Trivial Russel » Sat, 19 Apr 2003 10:10:09



[ Not sure who is responsible for this, but seems correct -- RR]


  The read function for consoles in include/linux/console.h contains const
  char* for a pointer that it will actually modify. Although no one seems
  to be using this as of now, it should be corrected.

--- trivial-2.5.67-bk8/include/linux/console.h.orig     2003-04-18 17:43:45.000000000 +1000

 {
        char    name[8];
        void    (*write)(struct console *, const char *, unsigned);
-       int     (*read)(struct console *, const char *, unsigned);
+       int     (*read)(struct console *, char *, unsigned);
        kdev_t  (*device)(struct console *);
        void    (*unblank)(void);
        int     (*setup)(struct console *, char *);
--
  Don't blame me: the Monkey is driving

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

1. const char* to char* update in console.h


  Hi all,

  (resending updated version for 2.5.69)

  The read function for consoles in include/linux/console.h contains const
  char* for a pointer that it will actually modify. Although no one seems
  to be using this as of now, it should be corrected.

--- trivial-2.5.69-bk18/include/linux/console.h.orig    2003-05-26 16:17:30.000000000 +1000

 {
        char    name[8];
        void    (*write)(struct console *, const char *, unsigned);
-       int     (*read)(struct console *, const char *, unsigned);
+       int     (*read)(struct console *, char *, unsigned);
        struct tty_driver *(*device)(struct console *, int *);
        void    (*unblank)(void);
        int     (*setup)(struct console *, char *);
--
  What is this? http://www.kernel.org/pub/linux/kernel/people/rusty/trivial/
  Don't blame me: the Monkey is driving

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

2. Linux Frequently Asked Questions with Answers (Part 4 of 6)

3. [2.5] const char* to char* update in console.h

4. CBREAK mode, etc.: Questions

5. [2.5] const char* to char* conversion in console.h

6. Data echange/Inter-process communication in X

7. [2.4] const char* to char* conversion in console.h

8. Help me,v.35 to E1

9. Gnu C++ stream.h char* form(const char*, ...)

10. 2.4.3-ac5 - static const char *foo to static char foo[]

11. C++: const int and const char* members in classes

12. [CALL FOR TESTERS] [const] char declarations, 2.5.41 update

13. char *strcasestr(char *haystack, char *needle) a simple case independent strstr()