mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Change of behaviour when console=null and ttynull driver is used
@ 2023-03-16 10:29 Guillermo Rodriguez Garcia
  2023-03-16 13:40 ` Guenter Roeck
  2023-03-17 12:51 ` Petr Mladek
  0 siblings, 2 replies; 12+ messages in thread
From: Guillermo Rodriguez Garcia @ 2023-03-16 10:29 UTC (permalink / raw)
  To: linux-kernel
  Cc: Petr Mladek, Alejandro Vazquez, Shreyas Joshi,
	sergey.senozhatsky, rostedt, shreyasjoshi15, Guenter Roeck

Hi all,

We have several embedded systems where pass console= or console=null
in production to disable the console.

Later we check for this in user space: in our inittab we check if fd0
is "associated with a terminal" (test -t 0); if so, we are in
development mode and we open a debug shell; otherwise (console
disabled) we just start the application.

Recently [1] this behaviour has changed and now if we pass console= or
console=null, the new ttynull driver is used. This breaks the check we
were doing (test -t 0 always true now).

Is there a way to get the previous behaviour? If not, is there an easy
way for userspace to detect whether the console device is a "real" tty
or ttynull (other than trying to parse the kernel boot args, which
would be a bit fragile).

Thank you,

(If possible, please CC me in any replies)

 [1]: https://lore.kernel.org/lkml/X%2FcDG%2FxCCzSWW2cd@alley/t/

-- 
Guillermo Rodriguez Garcia
guille.rodriguez@gmail.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-03-27  3:38 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-16 10:29 Change of behaviour when console=null and ttynull driver is used Guillermo Rodriguez Garcia
2023-03-16 13:40 ` Guenter Roeck
2023-03-22  8:23   ` Guillermo Rodriguez Garcia
2023-03-22 15:03     ` Guenter Roeck
2023-03-17 12:51 ` Petr Mladek
2023-03-22  8:33   ` Guillermo Rodriguez Garcia
2023-03-22 15:05     ` Guenter Roeck
2023-03-22 15:56       ` Guillermo Rodriguez Garcia
2023-03-24 15:08     ` Petr Mladek
2023-03-24 17:01       ` Guillermo Rodriguez Garcia
2023-03-26 23:20       ` Linus Torvalds
2023-03-27  3:38         ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®