linux-s390.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Valentin Vidić" <vvidic@valentin-vidic.from.hr>
To: Hendrik Brueckner <brueckner@linux.ibm.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org,
	Philipp Kern <pkern@debian.org>,
	Benjamin Zimmermann <dave@oss.volkswagen.com>,
	debian-s390@lists.debian.org,
	Peter Oberparleiter <oberpar@linux.ibm.com>
Subject: Re: [PATCH v2] s390/sclp_vt220: Fix console name to match device
Date: Wed, 28 Apr 2021 18:13:18 +0200	[thread overview]
Message-ID: <20210428161318.GX4672@valentin-vidic.from.hr> (raw)
In-Reply-To: <20210428133836.GD21939@linux.ibm.com>

On Wed, Apr 28, 2021 at 03:38:36PM +0200, Hendrik Brueckner wrote:
> It is been a while ago when working on consoles. However, consoles are
> typically devices without having a device node associated. There is special
> handling for /dev/console wrt. to the preferred console in the tty layer.
> 
> A console device might be associated with a tty device but this is not a
> requirement. For example, consider the net console that streams console
> messages thru UDP and is not associated with a tty.
> 
> Because console and tty are different devices, names can also be different
> which is, unfortunately, the case on s390.
> 
> Therefore my suggestion here is not derive the tty device from the name
> of the console, but rather looking at the associated tty being reported
> as major minor number in /proc/console.

Yes, I see what you mean. Loading netconsole produces a line in
/proc/consoles without the major:minor numbers:

  tty0                 -WU (EC p  )    4:7
  netcon0              -W- (E  p  )

On the other hand /proc/consoles documentation seems to suggest these
are character device names:
https://www.kernel.org/doc/html/latest/filesystems/proc.html#proc-consoles

Since sclp_vt220 seems to be the only know exception we are trying
to solve in that direction now.

If this does not work out, the alternative is as you suggested to take
the major:minor numbers and read the char device name from the symlink:

lrwxrwxrwx 1 root root 0 Apr 28 17:00 /sys/dev/char/4:7 -> ../../devices/virtual/tty/tty7

-- 
Valentin

      parent reply	other threads:[~2021-04-28 16:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-19 18:16 [PATCH] s390/sclp_vt220: Fix console name to match device Valentin Vidic
2020-05-20  5:25 ` Christian Borntraeger
2020-05-20  7:07   ` Valentin Vidić
2020-05-20  7:14     ` Christian Borntraeger
2020-05-20  8:04       ` Valentin Vidić
2021-04-27 19:40 ` [PATCH v2] " Valentin Vidic
2021-04-28 12:39   ` Christian Borntraeger
2021-04-28 13:38   ` Hendrik Brueckner
2021-04-28 14:44     ` Christian Borntraeger
2021-04-28 16:13     ` Valentin Vidić [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210428161318.GX4672@valentin-vidic.from.hr \
    --to=vvidic@valentin-vidic.from.hr \
    --cc=borntraeger@de.ibm.com \
    --cc=brueckner@linux.ibm.com \
    --cc=dave@oss.volkswagen.com \
    --cc=debian-s390@lists.debian.org \
    --cc=gor@linux.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=oberpar@linux.ibm.com \
    --cc=pkern@debian.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).