Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp1171896ybh; Sat, 3 Aug 2019 19:44:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqxs/kGEzNYetzq4+/HcXet9QM+1GNZ1Euz/UfukVkv/Yp6I42B/3DMyKbq0X6q96MvN+JL2 X-Received: by 2002:a17:902:5a2:: with SMTP id f31mr135474948plf.72.1564886645428; Sat, 03 Aug 2019 19:44:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564886645; cv=none; d=google.com; s=arc-20160816; b=jXgsy/QiikNFhxyTbyg6LdWcz8BJhdLZbTSm34ROlsGnoqlbymMUdeo+QBRN7K+SOz Rebf5t0MGUhgwdKJrDtQY1LAsJWZ2Ks2Xh3++NJqbwuFFLje4DD+BHSHK554cfOBbRcM i8FnvDBZl1VEnK+7C5KuO7sQRmx5s1d/qYrO9RphAl3whnSm4Jm1j9M06WZjb07kmZN/ GpAZskhbMwlJH5OQMvSjaePyZw6IZ4a3HD++rTSAkKxEFRASIJMP4tSUgVLdzVx6RKwK Tbm6rnhzSCMZ1lSSB4ECCzc8WA0WuXdrEQUjv2N8jGPg/sdRaxyi4qAWwi2N/iEDyVK0 uonw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=4qqBrpcvFV0wt/6XOV3Sx5nnMKvgPf15SjJfSMgczs8=; b=unlfb7WrUA2YYeEi50KjRSH7ZpQm6zYL1OGOxystq3urzCiqUwbX6E3E2X3vKo2m65 2ozbE324zU65tBW4cUc8/M47RXcZyel1yUAx2q21wMsTbYzhbVxMfjrIk7hIL0QNqFGr x4wDL/oDgQE9J11j/zv3jCu6oJ7m1me1xcBsQoigJHxKIMbOTbjWKu1oVc9HJZbbU375 uaMw2tgdUYzq0G/1/VuFuqqUNtv7axoDJ0R8F0r1nX+9FEVzNs8ZV+dvjutuvTtROwYp 1wFKJ6rmQHLc+DVrePdJqI7To+LAyFaqbCXZLmPcdpWHB34XDgMX6i9WkKJpytIN12OO +3hQ== ARC-Authentication-Results: i=1; mx.google.com; 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 v2si9440566pjy.48.2019.08.03.19.43.49; Sat, 03 Aug 2019 19:44:05 -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; 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 S2406886AbfHBT7I (ORCPT + 99 others); Fri, 2 Aug 2019 15:59:08 -0400 Received: from mx3.molgen.mpg.de ([141.14.17.11]:44747 "EHLO mx1.molgen.mpg.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2406868AbfHBT7I (ORCPT ); Fri, 2 Aug 2019 15:59:08 -0400 Received: from [10.0.101.109] (unknown [62.214.191.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: pmenzel) by mx.molgen.mpg.de (Postfix) with ESMTPSA id 90CDF201A3C39; Fri, 2 Aug 2019 21:59:06 +0200 (CEST) Subject: Re: Device to write to all (serial) consoles To: Greg Kroah-Hartman Cc: linux-serial@vger.kernel.org, Linux Kernel Mailing List , Donald Buczek References: <32c2d26f-ec4a-b9a6-b42c-07b27f99ea28@molgen.mpg.de> <20190802160243.GA15484@kroah.com> From: Paul Menzel Message-ID: Date: Fri, 2 Aug 2019 21:59:06 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190802160243.GA15484@kroah.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? Kind regards, Paul