From: Samuel Thibault Subject: Re: [PATCH] [UPDATE] secondary consoles in minos Date: Tue, 16 Jun 2009 17:50:46 +0200 Message-ID: <20090616155046.GS5866@const.bordeaux.inria.fr> References: <4A37BC8D.8020703@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: <4A37BC8D.8020703@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Stefano Stabellini Cc: xen-devel List-Id: xen-devel@lists.xenproject.org Stefano Stabellini, le Tue 16 Jun 2009 16:38:53 +0100, a =E9crit : > +struct consfront_dev *init_consfront(char *_nodename) > +{ > + static int consfrontends =3D 1; > + > + if (!_nodename) > + snprintf(nodename, sizeof(nodename), "device/console/%d", cons= frontends); > + else > + strncpy(nodename, _nodename, sizeof(nodename)); [...] > + > +int openpty(void) > +{ > + struct consfront_dev *dev; > + > + dev =3D init_consfront(NULL); > + dev->fd =3D alloc_fd(FTYPE_CONSOLE); > + files[dev->fd].cons.dev =3D dev; Mmm, what would it be used for? It is a bit odd this way, as the standard openpty function does not work this way (it _creates_ the pty and returns the master part of the pty too, not only the slave part). I would have rather seen a mere addition to the open() function for a special path, as is done for LOG_PATH. Samuel