Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp1203944ybh; Sat, 3 Aug 2019 20:32:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqxVk0p8NHfhyu1AWmtjIlYtpGrH6I7aWpq6q1xoYbxyTJiJ4F3TD4DM9DNEz58gmdyxTbzu X-Received: by 2002:a17:902:42d:: with SMTP id 42mr132224585ple.228.1564889575322; Sat, 03 Aug 2019 20:32:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564889575; cv=none; d=google.com; s=arc-20160816; b=IV4ez/+cSfyAxvEAct6xQnoL++ps0oKDLXFnQLF0KKtlGFFigfWvc4Pim9Yy4A0CyH gX9586P/Y0DvqFZ8NRyRmm0yQQJH32m2teJsOYerMVkpf661Wfbz+v4qt0jN8WLj8DmT nF/BtN76Rfptls8iS8eUZb+8B+D7IgTeouk6YRVK9e/CfNqZM4WF0ZpyKh1KJEhQYyWo vRHkLp/fXWYkjRd/IoM/mLTPTw/b1afC2wbuFanzievAqFGwD9tjiwzmqF2P1BsgIKo4 4NZ4+UDY/WpE+BY+0ur7RZq0b9Pyci1MQUXRoZBGlgjVIU6zE/wpKDLsCOeayc8nxdv2 XYvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=tFF8nt1VdAXkjcSQ5DCtYxuns93zbnx1p6KaaVMJLCs=; b=weiVSwz38eeMfdADfvvCy7kaE8RRBSIEMv4wdxVXfXgul/3WNu/rA+uzx6t9a2LCru Dv0lDNo7JZrRJATq7iSitwk8hrh7Tc8v39Ya3WDTyPV1g9CuvLDLVrKZIxgULmAKpIUy qlW0xuRRG5CNSTHYr8nJEWEGxPKoutDO+ahgYhOToJ3NxMrH97yR4fv559jFN7MlV6BG 4NLZAsPNFXubYMGymjBUHTqus/cQv41t5gwevL9XnqD1IsrWQ1g9l9t2iX4y5k9vkOmC 0NvDq0tfDh40Fo8EUZaDnCQHl2PjEDYik3WJZBmxtUE6KF/VlLJS9bVmVw2VQ/Au3RC7 QTNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Zl5KxrQA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 22si40572382pgu.226.2019.08.03.20.32.40; Sat, 03 Aug 2019 20:32:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Zl5KxrQA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726968AbfHCGqn (ORCPT + 99 others); Sat, 3 Aug 2019 02:46:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:33778 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726797AbfHCGqn (ORCPT ); Sat, 3 Aug 2019 02:46:43 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8AB442073D; Sat, 3 Aug 2019 06:46:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564814802; bh=1dLxmQz7MmTPHPcPV2oG34M03+qQWgSoagR/hWotRvs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Zl5KxrQADXPvOXSf+wD/mMgSWRM4Ge//olN9LaRqJpmDbYYiHpoJRmtpWK+odXpvT KYTI2X3tp8nwOSlWxEgHhU2xridzXyOSHxC89hGtFcEn8np+zthHcIHdNgRJLAPXZs SoaoPJa9Dp+7JGChVBpUIB1hZIHoYK5PKg16J424= Date: Sat, 3 Aug 2019 08:46:39 +0200 From: Greg Kroah-Hartman To: Paul Menzel Cc: linux-serial@vger.kernel.org, Linux Kernel Mailing List , Donald Buczek Subject: Re: Device to write to all (serial) consoles Message-ID: <20190803064639.GB10855@kroah.com> References: <32c2d26f-ec4a-b9a6-b42c-07b27f99ea28@molgen.mpg.de> <20190802160243.GA15484@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 02, 2019 at 09:59:06PM +0200, Paul Menzel wrote: > Dear Greg, > > > On 02.08.19 18:02, Greg Kroah-Hartman wrote: > > On Fri, Aug 02, 2019 at 03:23:08PM +0200, Paul Menzel wrote: > > > > On a lot of devices, like servers, you have more than one serial console, > > > and you do not always know, how they are numbered. Therefore, we start a > > > console on ttyS0 and ttyS1. > > > > > > In user space, we also would like to write to both consoles to not worry > > > about the numbering. Writing to `/dev/console` only write to the active > > > console. > > > > So the same data to multiple console devices with just one userspace > > call? Why? > > Because the cable is always connected to the port on the back side, and > sometimes the port in the front has ID 0, and the one in the back 1, and > other times vice versa. We do not want to track that, and it would be > convenient to just write to both ports. > > > > $ more /proc/consoles # I think > > > tty0 -WU (EC p ) 4:1 > > > ttyS0 -W- (E p a) 4:65 > > > ttyS1 -W- (E p a) 4:65 > > > > > > Does a device exist, or can a device be configured so you can write to > > > all (serial) consoles from user space? > > > > With one syscall, not that I know of, sorry. > > Can such a device be created with udev or so? No, a single device node can not reference multiple device nodes at the same time, sorry. That's just not how they work at all. thanks, greg k-h