lkml.org 
[lkml]   [2009]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: linux-next: manual merge of the tty tree with the tree
On Mon, Sep 07, 2009 at 03:55:44PM -0600, Joe Peterson wrote:
> Linus Torvalds wrote:
> > Hmm. I think that the "honor opost flag for echoes" patch is actually
> > wrong.
> >
> > We check O_OPOST() in the _caller_ for the regular write case, and that
> > test actually looks like this:
> >
> > if (O_OPOST(tty) && !(test_bit(TTY_HW_COOK_OUT, &tty->flags))) {
> >
> > so at a minimum, if we add it to process_output() we should likely add it
> > in the same format. But if we need that test, I'd rather do it in the
> > caller anyway, like we already do for regular writes.
>
> Yes, very true. The old opost() function also contained the O_OPOST
> check (i.e. causing a double check for normal writes), and you are right
> that we should not reintroduce it (and it makes sense for the caller to
> check it).
>
> There is only the one case in which the O_OPOST check is needed before
> calling do_output_char() (in process_echoes()), so we could just inline
> the test there. Take a look at my new attached patch (untested also).
> I'll test and resubmit, assuming there are no objections.

Thanks for doing this, I'll drop the patch from my tree and wait for you
to test and resubmit this.

thanks,

greg k-h


\
 
 \ /
  Last update: 2009-09-08 18:11    [W:0.073 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site