Merge tag 'printk-for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux
Pull printk updates from Petr Mladek: - Herbert Xu made printk header file self-contained. - Andy Shevchenko and Sergey Senozhatsky cleaned up console->setup() error handling. - Andy Shevchenko did some cleanups (e.g. sparse warning) in vsprintf code. - Minor documentation updates. * tag 'printk-for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux: lib/vsprintf: Force type of flags value for gfp_t lib/vsprintf: Replace custom spec to print decimals with generic one lib/vsprintf: Replace hidden BUILD_BUG_ON() with static_assert() printk: Make linux/printk.h self-contained doc:kmsg: explicitly state the return value in case of SEEK_CUR Replace HTTP links with HTTPS ones: vsprintf hvc: unify console setup naming console: Fix trivia typo 'change' -> 'chance' console: Propagate error code from console ->setup() tty: hvc: Return proper error code from console ->setup() hook serial: sunzilog: Return proper error code from console ->setup() hook serial: sunsab: Return proper error code from console ->setup() hook mips: Return proper error code from console ->setup() hook
This commit is contained in:
@@ -943,6 +943,14 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Be careful when modifying this function!!!
|
||||
*
|
||||
* Only few operations are supported because the device works only with the
|
||||
* entire variable length messages (records). Non-standard values are
|
||||
* returned in the other cases and has been this way for quite some time.
|
||||
* User space applications might depend on this behavior.
|
||||
*/
|
||||
static loff_t devkmsg_llseek(struct file *file, loff_t offset, int whence)
|
||||
{
|
||||
struct devkmsg_user *user = file->private_data;
|
||||
@@ -2658,7 +2666,7 @@ early_param("keep_bootcon", keep_bootcon_setup);
|
||||
static int try_enable_new_console(struct console *newcon, bool user_specified)
|
||||
{
|
||||
struct console_cmdline *c;
|
||||
int i;
|
||||
int i, err;
|
||||
|
||||
for (i = 0, c = console_cmdline;
|
||||
i < MAX_CMDLINECONSOLES && c->name[0];
|
||||
@@ -2681,8 +2689,8 @@ static int try_enable_new_console(struct console *newcon, bool user_specified)
|
||||
return 0;
|
||||
|
||||
if (newcon->setup &&
|
||||
newcon->setup(newcon, c->options) != 0)
|
||||
return -EIO;
|
||||
(err = newcon->setup(newcon, c->options)) != 0)
|
||||
return err;
|
||||
}
|
||||
newcon->flags |= CON_ENABLED;
|
||||
if (i == preferred_console) {
|
||||
@@ -2695,7 +2703,7 @@ static int try_enable_new_console(struct console *newcon, bool user_specified)
|
||||
/*
|
||||
* Some consoles, such as pstore and netconsole, can be enabled even
|
||||
* without matching. Accept the pre-enabled consoles only when match()
|
||||
* and setup() had a change to be called.
|
||||
* and setup() had a chance to be called.
|
||||
*/
|
||||
if (newcon->flags & CON_ENABLED && c->user_specified == user_specified)
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user