1 | From: Denis Mukhin <dmukhin@ford.com> | ||
---|---|---|---|
2 | |||
3 | Add is_console_printable() to implement a common check for printable characters | 1 | Add is_console_printable() to implement a common check for printable characters |
4 | in the UART emulation and guest logging code. | 2 | in the UART emulation and guest logging code. |
5 | 3 | ||
6 | Signed-off-by: Denis Mukhin <dmukhin@ford.com> | 4 | Signed-off-by: Denis Mukhin <dmukhin@ford.com> |
7 | --- | ||
8 | Link to the original patch: | ||
9 | https://lore.kernel.org/xen-devel/20250103-vuart-ns8250-v3-v1-1-c5d36b31d66c@ford.com/ | ||
10 | --- | ||
11 | --- | 5 | --- |
12 | xen/arch/arm/vuart.c | 5 ++--- | 6 | xen/arch/arm/vuart.c | 5 ++--- |
13 | xen/arch/x86/hvm/hvm.c | 5 ++--- | 7 | xen/arch/x86/hvm/hvm.c | 5 ++--- |
14 | xen/drivers/char/console.c | 3 +-- | 8 | xen/drivers/char/console.c | 3 +-- |
15 | xen/include/xen/console.h | 6 ++++++ | 9 | xen/include/xen/console.h | 6 ++++++ |
... | ... | ||
105 | 99 | ||
106 | extern int8_t opt_console_xen; | 100 | extern int8_t opt_console_xen; |
107 | 101 | ||
108 | +static inline bool is_console_printable(unsigned char c) | 102 | +static inline bool is_console_printable(unsigned char c) |
109 | +{ | 103 | +{ |
110 | + return isprint(c) || c == '\n' || c == '\t'; | 104 | + return isprint(c) || c == '\n' || c == '\t'; |
111 | +} | 105 | +} |
112 | + | 106 | + |
113 | #endif /* __CONSOLE_H__ */ | 107 | #endif /* __CONSOLE_H__ */ |
114 | -- | 108 | -- |
115 | 2.34.1 | 109 | 2.34.1 | diff view generated by jsdifflib |