[PATCH] Duplicate PROC_CONSOLE()
DORMANTno replies
From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2003-04-09 14:04:12
A clean up for 2.4.x:
- Remove local copy of PROC_CONSOLE() in drivers/video/modedb.c. A global one
is already provided by drivers/video/fbcon.c
- Add missing multiple include protectors to <linux/console_struct.h>
OK to send this to Alan and Marcelo?
--- linux-2.4.x/drivers/video/modedb.c.orig Sun Dec 23 11:25:09 2001
+++ linux-2.4.x/drivers/video/modedb.c Wed Apr 9 13:47:05 2003@@ -16,6 +16,7 @@ #include <linux/fb.h> #include <linux/console_struct.h> #include <linux/sched.h> +#include <video/fbcon.h> #undef DEBUG
@@ -255,28 +256,6 @@ return val; } } -} - -static int PROC_CONSOLE(const struct fb_info *info) -{ - int fgc; - - if (info->display_fg != NULL) - fgc = info->display_fg->vc_num; - else - return -1; - - if (!current->tty) - return fgc; - - if (current->tty->driver.type != TTY_DRIVER_TYPE_CONSOLE) - /* XXX Should report error here? */ - return fgc; - - if (MINOR(current->tty->device) < 1) - return fgc; - - return MINOR(current->tty->device) - 1; } --- linux-2.4.x/include/linux/console_struct.h.orig Thu Sep 20 10:51:46 2001 +++ linux-2.4.x/include/linux/console_struct.h Wed Apr 9 13:54:58 2003
@@ -9,6 +9,9 @@ * to achieve effects such as fast scrolling by changing the origin. */ +#ifndef _LINUX_CONSOLE_STRUCT_H_ +#define _LINUX_CONSOLE_STRUCT_H_ + #define NPAR 16 struct vc_data {
@@ -107,3 +110,5 @@ #define CUR_DEFAULT CUR_UNDERLINE #define CON_IS_VISIBLE(conp) (*conp->vc_display_fg == conp) + +#endif /* _LINUX_CONSOLE_STRUCT_H_ */
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger
for complex code. Debugging C/C++ programs can leave you feeling lost and
disoriented. TotalView can help you find your way. Available on major UNIX
and Linux platforms. Try it free. www.etnus.com