[PATCH] constify tty flip buffer handling

Add a couple of 'const' qualifiers to the TTY flip buffer APIs, where
appropriate.

Signed-off-by: Thomas Koeller <thomas@koeller.dyndns.org>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Thomas Koeller 2006-03-25 03:07:03 -08:00 committed by Linus Torvalds
parent c41a24ce1f
commit 1aef821a6b
2 changed files with 4 additions and 4 deletions

View File

@ -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
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 {

View File

@ -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);