When commit 5becfb1df5ac8e49 ("kmsg: merge continuation records while printing") introduced LOG_PREFIX, we used KERN_DEFAULT etc. as a flag for setting LOG_PREFIX in order to tell whether to call cont_add() (i.e. whether to append the message to "struct cont"). But since commit 4bcc595ccd80decb ("printk: reinstate KERN_CONT for printing continuation lines") inverted the behavior (i.e. don't append the message to "struct cont" unless KERN_CONT is specified) and commit 5aa068ea4082b39e ("printk: remove games with previous record flags") removed the last LOG_PREFIX check, setting LOG_PREFIX via KERN_DEFAULT etc. is no longer meaningful. Therefore, we can remove LOG_PREFIX and make KERN_DEFAULT empty string.
Unified · Split
| @@ -14,7 +14,7 @@ · 13 unmodified lines | ||
| 14 | 14 | #define KERN_INFO KERN_SOH "6" /* informational */ |
| 15 | 15 | #define KERN_DEBUG KERN_SOH "7" /* debug-level messages */ |
| 16 | 16 | |
| 17 | −#define KERN_DEFAULT KERN_SOH "d" /* the default kernel loglevel */ | |
| 17 | +#define KERN_DEFAULT "" /* the default kernel loglevel */ | |
| 18 | 18 | |
| 19 | 19 | /* |
| 20 | 20 | * Annotation for a "continued" line of log printout (only done after a |
| @@ -18,7 +18,6 @@ static inline int printk_get_level(const char *buffer) · 17 unmodified lines | ||
| 18 | 18 | if (buffer[0] == KERN_SOH_ASCII && buffer[1]) { |
| 19 | 19 | switch (buffer[1]) { |
| 20 | 20 | case '0' ... '7': |
| 21 | − case 'd': /* KERN_DEFAULT */ | |
| 22 | 21 | case 'c': /* KERN_CONT */ |
| 23 | 22 | return buffer[1]; |
| 24 | 23 | } |
| @@ -345,7 +345,6 @@ static int console_msg_format = MSG_FORMAT_DEFAULT; · 344 unmodified lines | ||
| 345 | 345 | |
| 346 | 346 | enum log_flags { |
| 347 | 347 | LOG_NEWLINE = 2, /* text ended with a newline */ |
| 348 | − LOG_PREFIX = 4, /* text started with a prefix */ | |
| 349 | 348 | LOG_CONT = 8, /* text is a fragment of a continuation line */ |
| 350 | 349 | }; |
| 351 | 350 | |
| @@ -1922,9 +1921,6 @@ int vprintk_store(int facility, int level, · 1570 unmodified lines | ||
| 1922 | 1921 | case '0' ... '7': |
| 1923 | 1922 | if (level == LOGLEVEL_DEFAULT) |
| 1924 | 1923 | level = kern_level - '0'; |
| 1925 | − /* fallthrough */ | |
| 1926 | − case 'd': /* KERN_DEFAULT */ | |
| 1927 | − lflags |= LOG_PREFIX; | |
| 1928 | 1924 | break; |
| 1929 | 1925 | case 'c': /* KERN_CONT */ |
| 1930 | 1926 | lflags |= LOG_CONT; |
| @@ -1939,7 +1935,7 @@ int vprintk_store(int facility, int level, · 8 unmodified lines | ||
| 1939 | 1935 | level = default_message_loglevel; |
| 1940 | 1936 | |
| 1941 | 1937 | if (dict) |
| 1942 | − lflags |= LOG_PREFIX|LOG_NEWLINE; | |
| 1938 | + lflags |= LOG_NEWLINE; | |
| 1943 | 1939 | |
| 1944 | 1940 | return log_output(facility, level, lflags, |
| 1945 | 1941 | dict, dictlen, text, text_len); |