|
@@ -465,7 +465,7 @@ static ssize_t devkmsg_read(struct file *file, char __user *buf,
|
|
|
for (i = 0; i < msg->text_len; i++) {
|
|
|
unsigned char c = log_text(msg)[i];
|
|
|
|
|
|
- if (c < ' ' || c >= 128)
|
|
|
+ if (c < ' ' || c >= 127 || c == '\\')
|
|
|
len += sprintf(user->buf + len, "\\x%02x", c);
|
|
|
else
|
|
|
user->buf[len++] = c;
|
|
@@ -489,7 +489,7 @@ static ssize_t devkmsg_read(struct file *file, char __user *buf,
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
- if (c < ' ' || c >= 128) {
|
|
|
+ if (c < ' ' || c >= 127 || c == '\\') {
|
|
|
len += sprintf(user->buf + len, "\\x%02x", c);
|
|
|
continue;
|
|
|
}
|