tty flip buffer handling
Subsystems (2)
PATCH 1/1 tty flip buffer handling
Add a couple of 'const' qualifiers to the TTY flip buffer APIs, where appropriate.
Signed-off-by Thomas Koeller <[email protected]>
drivers/char/tty_io.c +2 -2
@@ -354,7 +354,7 @@ int tty_buffer_request_room(struct tty_sEXPORT_SYMBOL_GPL (tty_buffer_request_room); -int tty_insert_flip_string (struct tty_struct *tty,unsigned char *chars,size_t size) +int tty_insert_flip_string (struct tty_struct *tty,const unsigned char *chars,size_t size) {int copied =0 ; do {
@@ -378,7 +378,7 @@ int tty_insert_flip_string(struct tty_stEXPORT_SYMBOL_GPL (tty_insert_flip_string); -int tty_insert_flip_string_flags (struct tty_struct *tty,unsigned char *chars,char *flags,size_t size) +int tty_insert_flip_string_flags (struct tty_struct *tty,const unsigned char *chars,const char *flags,size_t size) {int copied =0 ; do {
include/linux/tty_flip.h +2 -2
@@ -2,8 +2,8 @@#define _LINUX_TTY_FLIP_Hextern int tty_buffer_request_room (struct tty_struct *tty,size_t size); -extern int tty_insert_flip_string (struct tty_struct *tty,unsigned char *chars,size_t size); -extern int tty_insert_flip_string_flags (struct tty_struct *tty,unsigned char *chars,char *flags,size_t size); +extern int tty_insert_flip_string (struct tty_struct *tty,const unsigned char *chars,size_t size); +extern int tty_insert_flip_string_flags (struct tty_struct *tty,const unsigned char *chars,const char *flags,size_t size);extern int tty_prepare_flip_string (struct tty_struct *tty,unsigned char **chars,size_t size);extern int tty_prepare_flip_string_flags (struct tty_struct *tty,unsigned char **chars,char **flags,size_t size);
Signature · 2 lines
Thomas Koeller [email protected]
Quoted 4 lines · Thomas Koeller
Add a couple of 'const' qualifiers to the TTY flip buffer APIs, where appropriate.
Signed-off-by Thomas Koeller <[email protected]>
Acked-by Alan Cox <[email protected]>
--
The Master doesn't talk, he acts.
When his work is done,
the people say, "Amazing:
we did it, all by ourselves!" -- Lao-tzu