summaryrefslogtreecommitdiffstats
path: root/include/linux/console.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1997-12-16 05:34:03 +0000
committerRalf Baechle <ralf@linux-mips.org>1997-12-16 05:34:03 +0000
commit967c65a99059fd459b956c1588ce0ba227912c4e (patch)
tree8224d013ff5d255420713d05610c7efebd204d2a /include/linux/console.h
parente20c1cc1656a66a2773bca4591a895cbc12696ff (diff)
Merge with Linux 2.1.72, part 1.
Diffstat (limited to 'include/linux/console.h')
-rw-r--r--include/linux/console.h58
1 files changed, 31 insertions, 27 deletions
diff --git a/include/linux/console.h b/include/linux/console.h
index 16f1754ec..fc5cd4b2d 100644
--- a/include/linux/console.h
+++ b/include/linux/console.h
@@ -62,36 +62,40 @@ extern struct consw *conswitchp;
struct tty_struct;
int tioclinux(struct tty_struct *tty, unsigned long arg);
-/* The interface for /dev/console(s) and printk output */
+/*
+ * Array of consoles built from command line options (console=)
+ */
+struct console_cmdline
+{
+ char name[8]; /* Name of the driver */
+ int index; /* Minor dev. to use */
+ char *options; /* Options for the driver */
+};
+#define MAX_CMDLINECONSOLES 8
+extern struct console_cmdline console_list[MAX_CMDLINECONSOLES];
+
+/*
+ * The interface for a console, or any other device that
+ * wants to capture console messages (printer driver?)
+ */
+
+#define CON_PRINTBUFFER (1)
+#define CON_FIRST (2)
+#define CON_ENABLED (4)
struct console
{
- /*
- * This function should not return before the string is written.
- */
- void (*write)(const char*, unsigned);
-
- /* To unblank the console in case of panic */
- void (*unblank)(void);
-
- /*
- * Only the console that was registered last with wait_key !=
- * NULL will be used. This blocks until there is a character
- * to give back, it does not schedule.
- */
- void (*wait_key)(void);
-
- /*
- * Return the device to use when opening /dev/console. Only the
- * last registered console will do.
- */
- int (*device)(void);
-
- /*
- * For a linked list of consoles for multiple output. Any console
- * not at the head of the list is used only for output.
- */
- struct console *next;
+ char name[8];
+ void (*write)(struct console *, const char *, unsigned);
+ int (*read)(struct console *, const char *, unsigned);
+ kdev_t (*device)(struct console *);
+ int (*wait_key)(struct console *);
+ void (*unblank)(void);
+ int (*setup)(struct console *, char *);
+ short flags;
+ short index;
+ int cflag;
+ struct console *next;
};
extern void register_console(struct console *);