From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by befuddled.reisers.ca (Postfix, from userid 65534) id 4D94C1F0270; Sun, 26 Feb 2017 00:09:18 -0500 (EST) Received: from mail0205.smtp25.com (mail0205.smtp25.com [174.37.170.205]) by befuddled.reisers.ca (Postfix) with ESMTPS id 827041F0258 for ; Sun, 26 Feb 2017 00:09:16 -0500 (EST) Received: from ccs.covici.com (localhost [127.0.0.1]) by ccs.covici.com (8.14.9/8.14.8) with ESMTP id v1Q4Ujws013253 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 25 Feb 2017 23:30:45 -0500 Received: (from covici@localhost) by ccs.covici.com (8.14.9/8.13.7/Submit) id v1Q4UjEj013251; Sat, 25 Feb 2017 23:30:45 -0500 Date: Sat, 25 Feb 2017 23:30:45 -0500 Message-ID: From: John Covici To: "Speakup is a screen review system for Linux." Subject: Re: [patch 1/6] tty_port: allow a port to be opened with a tty that has no file handle In-Reply-To: <20170226010543.prrdalpdj5jfyzee@var.youpi.perso.aquilenet.fr> References: <20170225191801.GA4482@sanghar> <20170225192132.GA4492@sanghar> <20170226005342.fwm5wyilv6jewrbb@var.youpi.perso.aquilenet.fr> <20170226010543.prrdalpdj5jfyzee@var.youpi.perso.aquilenet.fr> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.8 EasyPG/1.0.0 Emacs/25.1.90 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) Reply-To: covici@ccs.covici.com Organization: Covici Computer Systems MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-SpamH-Filter: s-out-001.smtp25.com-v1Q4X2ka022711 X-SpamH-OriginatingIP: 70.109.53.110 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 X-BeenThere: speakup@linux-speakup.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Speakup is a screen review system for Linux." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Feb 2017 05:09:18 -0000 I wonder if applications should be allowed to open the tty? What if you had a speech dispatcher serial driver or some such? On Sat, 25 Feb 2017 20:05:43 -0500, Samuel Thibault wrote: >=20 > Samuel Thibault, on dim. 26 f=E9vr. 2017 01:53:42 +0100, wrote: > > Okash Khawaja, on sam. 25 f=E9vr. 2017 19:21:32 +0000, wrote: > > > Allow access to TTY device from kernel. > >=20 > > When opening the TTY from an application (e.g. echo foo > /dev/ttyS0), > > we get this: > >=20 > > ttyS ttyS0: tty_open: tty->count(3) !=3D #fd's(2) > > ttyS ttyS0: tty_release: tty->count(3) !=3D #fd's(2) > >=20 > > This is because the number of files in tty_files doesn't match the > > open count for tty. spk_ttyio_initialise_ldisc should thus mimic > > tty_open a bit more: after calling tty_open_by_driver, it should call > > tty_add_file(tty, NULL); to add an entry in the tty_files list (and why > > not calling check_tty_count too). And of course, the converse > > (tty_del_file) should be called by spk_ttyio_release between the > > tty_ldisc_flush call and tty_unlock. >=20 > Oops, of course you don't have a filp to give to tty_del_file, so that > can't work. Ok, let's ignore the issue for now, applications are not > supposed to open the tty used by speakup anyway (and would get an EIO > error anyway). >=20 > Samuel > _______________________________________________ > Speakup mailing list > Speakup@linux-speakup.org > http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup >=20 --=20 Your life is like a penny. You're going to lose it. The question is: How do you spend it? John Covici covici@ccs.covici.com