Pull printk updates from Petr Mladek: - Refactor printk code for formatting messages that are shown on consoles. This is a preparatory step for introducing atomic consoles which could not share the global buffers - Prevent memory leak when removing printk index in debugfs - Dump also the newest printk message by the sample gdbmacro - Fix a compiler warning * tag 'printk-for-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux: printf: fix errname.c list kernel/printk/index.c: fix memory leak with using debugfs_lookup() printk: Use scnprintf() to print the message about the dropped messages on a console printk: adjust string limit macros printk: use printk_buffers for devkmsg printk: introduce console_prepend_dropped() for dropped messages printk: introduce printk_get_next_message() and printk_message printk: introduce struct printk_buffers console: Document struct console console: Use BIT() macros for @flags values printk: move size limit macros into internal.h docs: gdbmacros: print newest record
Showing the changes to lib (1 of 7 files). Show all
Unified · Split
| @@ -21,6 +21,7 @@ static const char *names_0[] = { · 20 unmodified lines | ||
| 21 | 21 | E(EADDRNOTAVAIL), |
| 22 | 22 | E(EADV), |
| 23 | 23 | E(EAFNOSUPPORT), |
| 24 | + E(EAGAIN), /* EWOULDBLOCK */ | |
| 24 | 25 | E(EALREADY), |
| 25 | 26 | E(EBADE), |
| 26 | 27 | E(EBADF), |
| @@ -31,15 +32,17 @@ static const char *names_0[] = { · 4 unmodified lines | ||
| 31 | 32 | E(EBADSLT), |
| 32 | 33 | E(EBFONT), |
| 33 | 34 | E(EBUSY), |
| 34 | −#ifdef ECANCELLED | |
| 35 | − E(ECANCELLED), | |
| 36 | −#endif | |
| 35 | + E(ECANCELED), /* ECANCELLED */ | |
| 37 | 36 | E(ECHILD), |
| 38 | 37 | E(ECHRNG), |
| 39 | 38 | E(ECOMM), |
| 40 | 39 | E(ECONNABORTED), |
| 40 | + E(ECONNREFUSED), /* EREFUSED */ | |
| 41 | 41 | E(ECONNRESET), |
| 42 | + E(EDEADLK), /* EDEADLOCK */ | |
| 43 | +#if EDEADLK != EDEADLOCK /* mips, sparc, powerpc */ | |
| 42 | 44 | E(EDEADLOCK), |
| 45 | +#endif | |
| 43 | 46 | E(EDESTADDRREQ), |
| 44 | 47 | E(EDOM), |
| 45 | 48 | E(EDOTDOT), |
| @@ -166,14 +169,17 @@ static const char *names_0[] = { · 120 unmodified lines | ||
| 166 | 169 | E(EUSERS), |
| 167 | 170 | E(EXDEV), |
| 168 | 171 | E(EXFULL), |
| 169 | − | |
| 170 | − E(ECANCELED), /* ECANCELLED */ | |
| 171 | − E(EAGAIN), /* EWOULDBLOCK */ | |
| 172 | − E(ECONNREFUSED), /* EREFUSED */ | |
| 173 | − E(EDEADLK), /* EDEADLOCK */ | |
| 174 | 172 | }; |
| 175 | 173 | #undef E |
| 176 | 174 | |
| 175 | +#ifdef EREFUSED /* parisc */ | |
| 176 | +static_assert(EREFUSED == ECONNREFUSED); | |
| 177 | +#endif | |
| 178 | +#ifdef ECANCELLED /* parisc */ | |
| 179 | +static_assert(ECANCELLED == ECANCELED); | |
| 180 | +#endif | |
| 181 | +static_assert(EAGAIN == EWOULDBLOCK); /* everywhere */ | |
| 182 | + | |
| 177 | 183 | #define E(err) [err - 512 + BUILD_BUG_ON_ZERO(err < 512 || err > 550)] = "-" #err |
| 178 | 184 | static const char *names_512[] = { |
| 179 | 185 | E(ERESTARTSYS), |