diff options
Diffstat (limited to 'include/linux/vt_kern.h')
| -rw-r--r-- | include/linux/vt_kern.h | 64 |
1 files changed, 53 insertions, 11 deletions
diff --git a/include/linux/vt_kern.h b/include/linux/vt_kern.h index 7f56db4a79f0..6625cc1ab758 100644 --- a/include/linux/vt_kern.h +++ b/include/linux/vt_kern.h | |||
| @@ -76,17 +76,52 @@ int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc); | |||
| 76 | #define vc_translate(vc, c) ((vc)->vc_translate[(c) | \ | 76 | #define vc_translate(vc, c) ((vc)->vc_translate[(c) | \ |
| 77 | ((vc)->vc_toggle_meta ? 0x80 : 0)]) | 77 | ((vc)->vc_toggle_meta ? 0x80 : 0)]) |
| 78 | #else | 78 | #else |
| 79 | #define con_set_trans_old(arg) (0) | 79 | static inline int con_set_trans_old(unsigned char __user *table) |
| 80 | #define con_get_trans_old(arg) (-EINVAL) | 80 | { |
| 81 | #define con_set_trans_new(arg) (0) | 81 | return 0; |
| 82 | #define con_get_trans_new(arg) (-EINVAL) | 82 | } |
| 83 | #define con_clear_unimap(vc, ui) (0) | 83 | static inline int con_get_trans_old(unsigned char __user *table) |
| 84 | #define con_set_unimap(vc, ct, list) (0) | 84 | { |
| 85 | #define con_set_default_unimap(vc) (0) | 85 | return -EINVAL; |
| 86 | #define con_copy_unimap(d, s) (0) | 86 | } |
| 87 | #define con_get_unimap(vc, ct, uct, list) (-EINVAL) | 87 | static inline int con_set_trans_new(unsigned short __user *table) |
| 88 | #define con_free_unimap(vc) do { ; } while (0) | 88 | { |
| 89 | #define con_protect_unimap(vc, rdonly) do { ; } while (0) | 89 | return 0; |
| 90 | } | ||
| 91 | static inline int con_get_trans_new(unsigned short __user *table) | ||
| 92 | { | ||
| 93 | return -EINVAL; | ||
| 94 | } | ||
| 95 | static inline int con_clear_unimap(struct vc_data *vc, struct unimapinit *ui) | ||
| 96 | { | ||
| 97 | return 0; | ||
| 98 | } | ||
| 99 | static inline | ||
| 100 | int con_set_unimap(struct vc_data *vc, ushort ct, struct unipair __user *list) | ||
| 101 | { | ||
| 102 | return 0; | ||
| 103 | } | ||
| 104 | static inline | ||
| 105 | int con_get_unimap(struct vc_data *vc, ushort ct, ushort __user *uct, | ||
| 106 | struct unipair __user *list) | ||
| 107 | { | ||
| 108 | return -EINVAL; | ||
| 109 | } | ||
| 110 | static inline int con_set_default_unimap(struct vc_data *vc) | ||
| 111 | { | ||
| 112 | return 0; | ||
| 113 | } | ||
| 114 | static inline void con_free_unimap(struct vc_data *vc) | ||
| 115 | { | ||
| 116 | } | ||
| 117 | static inline void con_protect_unimap(struct vc_data *vc, int rdonly) | ||
| 118 | { | ||
| 119 | } | ||
| 120 | static inline | ||
| 121 | int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc) | ||
| 122 | { | ||
| 123 | return 0; | ||
| 124 | } | ||
| 90 | 125 | ||
| 91 | #define vc_translate(vc, c) (c) | 126 | #define vc_translate(vc, c) (c) |
| 92 | #endif | 127 | #endif |
| @@ -100,6 +135,13 @@ extern int unbind_con_driver(const struct consw *csw, int first, int last, | |||
| 100 | int deflt); | 135 | int deflt); |
| 101 | int vty_init(const struct file_operations *console_fops); | 136 | int vty_init(const struct file_operations *console_fops); |
| 102 | 137 | ||
| 138 | static inline bool vt_force_oops_output(struct vc_data *vc) | ||
| 139 | { | ||
| 140 | if (oops_in_progress && vc->vc_panic_force_write) | ||
| 141 | return true; | ||
| 142 | return false; | ||
| 143 | } | ||
| 144 | |||
| 103 | /* | 145 | /* |
| 104 | * vc_screen.c shares this temporary buffer with the console write code so that | 146 | * vc_screen.c shares this temporary buffer with the console write code so that |
| 105 | * we can easily avoid touching user space while holding the console spinlock. | 147 | * we can easily avoid touching user space while holding the console spinlock. |
