All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: Samuel Thibault <samuel.thibault@ens-lyon.org>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	xen-devel <xen-devel@lists.xensource.com>
Subject: Re: [PATCH] [UPDATE]  secondary consoles in minos
Date: Tue, 16 Jun 2009 17:07:37 +0100	[thread overview]
Message-ID: <4A37C349.6020101@eu.citrix.com> (raw)
In-Reply-To: <20090616155046.GS5866@const.bordeaux.inria.fr>

Samuel Thibault wrote:

> Stefano Stabellini, le Tue 16 Jun 2009 16:38:53 +0100, a écrit :
>> +struct consfront_dev *init_consfront(char *_nodename)
>> +{
>> +    static int consfrontends = 1;
>> +
>> +    if (!_nodename)
>> +        snprintf(nodename, sizeof(nodename), "device/console/%d", consfrontends);
>> +    else
>> +        strncpy(nodename, _nodename, sizeof(nodename));
> [...]
>> +
>> +int openpty(void)
>> +{
>> +    struct consfront_dev *dev;
>> +
>> +    dev = init_consfront(NULL);
>> +    dev->fd = alloc_fd(FTYPE_CONSOLE);
>> +    files[dev->fd].cons.dev = 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.
> 

In qemu there is a differnt qemu_chr_open_pty per architecture so I have
implemented a stubdom specific qemu_chr_open_pty that uses openpty(void).

I chose to create a new function called openpty because it is
conceptually similar to the standard openpty, however I didn't want it
to be standard compliant because it is not the same.

I realize it can be a little confusing, but I don't think that using
another special case in the open() is much better.

Keir which one do you prefer?

      reply	other threads:[~2009-06-16 16:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-16 15:38 [PATCH] [UPDATE] secondary consoles in minos Stefano Stabellini
2009-06-16 15:50 ` Samuel Thibault
2009-06-16 16:07   ` Stefano Stabellini [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=4A37C349.6020101@eu.citrix.com \
    --to=stefano.stabellini@eu.citrix.com \
    --cc=samuel.thibault@ens-lyon.org \
    --cc=xen-devel@lists.xensource.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.