.. | .. |
---|
24 | 24 | struct tty_struct; |
---|
25 | 25 | struct notifier_block; |
---|
26 | 26 | |
---|
27 | | -/* |
---|
28 | | - * this is what the terminal answers to a ESC-Z or csi0c query. |
---|
29 | | - */ |
---|
30 | | -#define VT100ID "\033[?1;2c" |
---|
31 | | -#define VT102ID "\033[?6c" |
---|
32 | | - |
---|
33 | 27 | enum con_scroll { |
---|
34 | 28 | SM_UP, |
---|
35 | 29 | SM_DOWN, |
---|
36 | 30 | }; |
---|
| 31 | + |
---|
| 32 | +enum vc_intensity; |
---|
37 | 33 | |
---|
38 | 34 | /** |
---|
39 | 35 | * struct consw - callbacks for consoles |
---|
.. | .. |
---|
74 | 70 | void (*con_scrolldelta)(struct vc_data *vc, int lines); |
---|
75 | 71 | int (*con_set_origin)(struct vc_data *vc); |
---|
76 | 72 | void (*con_save_screen)(struct vc_data *vc); |
---|
77 | | - u8 (*con_build_attr)(struct vc_data *vc, u8 color, u8 intensity, |
---|
78 | | - u8 blink, u8 underline, u8 reverse, u8 italic); |
---|
| 73 | + u8 (*con_build_attr)(struct vc_data *vc, u8 color, |
---|
| 74 | + enum vc_intensity intensity, |
---|
| 75 | + bool blink, bool underline, bool reverse, bool italic); |
---|
79 | 76 | void (*con_invert_region)(struct vc_data *vc, u16 *p, int count); |
---|
80 | | - u16 *(*con_screen_pos)(struct vc_data *vc, int offset); |
---|
| 77 | + u16 *(*con_screen_pos)(const struct vc_data *vc, int offset); |
---|
81 | 78 | unsigned long (*con_getxy)(struct vc_data *vc, unsigned long position, |
---|
82 | 79 | int *px, int *py); |
---|
83 | 80 | /* |
---|
.. | .. |
---|
101 | 98 | extern const struct consw dummy_con; /* dummy console buffer */ |
---|
102 | 99 | extern const struct consw vga_con; /* VGA text console */ |
---|
103 | 100 | extern const struct consw newport_con; /* SGI Newport console */ |
---|
104 | | -extern const struct consw prom_con; /* SPARC PROM console */ |
---|
105 | 101 | |
---|
106 | 102 | int con_is_bound(const struct consw *csw); |
---|
107 | 103 | int do_unregister_con_driver(const struct consw *csw); |
---|
.. | .. |
---|
135 | 131 | */ |
---|
136 | 132 | |
---|
137 | 133 | #define CON_PRINTBUFFER (1) |
---|
138 | | -#define CON_CONSDEV (2) /* Last on the command line */ |
---|
| 134 | +#define CON_CONSDEV (2) /* Preferred console, /dev/console */ |
---|
139 | 135 | #define CON_ENABLED (4) |
---|
140 | 136 | #define CON_BOOT (8) |
---|
141 | 137 | #define CON_ANYTIME (16) /* Safe to call when cpu is offline */ |
---|
142 | 138 | #define CON_BRL (32) /* Used for a braille device */ |
---|
143 | 139 | #define CON_EXTENDED (64) /* Use the extended output format a la /dev/kmsg */ |
---|
144 | | -#ifdef CONFIG_PSTORE_CONSOLE_FORCE |
---|
145 | | -#define CON_PSTORE (128) /* Print to pstore console anyway */ |
---|
146 | | -#endif |
---|
147 | 140 | |
---|
148 | 141 | struct console { |
---|
149 | 142 | char name[16]; |
---|
.. | .. |
---|
152 | 145 | struct tty_driver *(*device)(struct console *, int *); |
---|
153 | 146 | void (*unblank)(void); |
---|
154 | 147 | int (*setup)(struct console *, char *); |
---|
| 148 | + int (*exit)(struct console *); |
---|
155 | 149 | int (*match)(struct console *, char *name, int idx, char *options); |
---|
156 | 150 | short flags; |
---|
157 | 151 | short index; |
---|
.. | .. |
---|
169 | 163 | extern int console_set_on_cmdline; |
---|
170 | 164 | extern struct console *early_console; |
---|
171 | 165 | |
---|
| 166 | +enum con_flush_mode { |
---|
| 167 | + CONSOLE_FLUSH_PENDING, |
---|
| 168 | + CONSOLE_REPLAY_ALL, |
---|
| 169 | +}; |
---|
| 170 | + |
---|
172 | 171 | extern int add_preferred_console(char *name, int idx, char *options); |
---|
173 | 172 | extern void register_console(struct console *); |
---|
174 | 173 | extern int unregister_console(struct console *); |
---|
.. | .. |
---|
178 | 177 | extern void console_unlock(void); |
---|
179 | 178 | extern void console_conditional_schedule(void); |
---|
180 | 179 | extern void console_unblank(void); |
---|
181 | | -extern void console_flush_on_panic(void); |
---|
| 180 | +extern void console_flush_on_panic(enum con_flush_mode mode); |
---|
182 | 181 | extern struct tty_driver *console_device(int *); |
---|
183 | 182 | extern void console_stop(struct console *); |
---|
184 | 183 | extern void console_start(struct console *); |
---|
.. | .. |
---|
199 | 198 | extern void resume_console(void); |
---|
200 | 199 | |
---|
201 | 200 | int mda_console_init(void); |
---|
202 | | -void prom_con_init(void); |
---|
203 | 201 | |
---|
204 | 202 | void vcs_make_sysfs(int index); |
---|
205 | 203 | void vcs_remove_sysfs(int index); |
---|