Commit 1aef821a authored by Thomas Koeller's avatar Thomas Koeller Committed by Linus Torvalds

[PATCH] constify tty flip buffer handling

Add a couple of 'const' qualifiers to the TTY flip buffer APIs, where
appropriate.
Signed-off-by: default avatarThomas Koeller <thomas@koeller.dyndns.org>
Acked-by: default avatarAlan Cox <alan@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent c41a24ce
...@@ -354,7 +354,7 @@ int tty_buffer_request_room(struct tty_struct *tty, size_t size) ...@@ -354,7 +354,7 @@ int tty_buffer_request_room(struct tty_struct *tty, size_t size)
EXPORT_SYMBOL_GPL(tty_buffer_request_room); EXPORT_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; int copied = 0;
do { do {
...@@ -378,7 +378,7 @@ int tty_insert_flip_string(struct tty_struct *tty, unsigned char *chars, size_t ...@@ -378,7 +378,7 @@ int tty_insert_flip_string(struct tty_struct *tty, unsigned char *chars, size_t
EXPORT_SYMBOL_GPL(tty_insert_flip_string); EXPORT_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; int copied = 0;
do { do {
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
#define _LINUX_TTY_FLIP_H #define _LINUX_TTY_FLIP_H
extern int tty_buffer_request_room(struct tty_struct *tty, size_t size); extern 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(struct tty_struct *tty, const 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_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(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); extern int tty_prepare_flip_string_flags(struct tty_struct *tty, unsigned char **chars, char **flags, size_t size);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment