[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [PATCH] fix serial console option parsing (#767745)



On Wed, 2012-02-01 at 16:35 -0800, Brian C. Lane wrote:
> On Wed, Feb 01, 2012 at 01:54:21PM -0500, Will Woods wrote:
> [snip]
> 
> > @@ -1111,18 +1144,24 @@ class GRUB(BootLoader):
> >  
> >      @property
> >      def serial_command(self):
> > -        command = ""
> > +        command = ["serial"]
> >          if self.console and self.console.startswith("ttyS"):
> 
> [snip]
> 
> > +        return " ".join(command)
> 
> This is going to return "serial" even when self.console is false. Is
> that desired? It doesn't match the previous behavior of returning "".

Oh, good point. It works as-is because it only gets called in two places
(write_config_console and write_defaults), and it's inside an
"if self.console.startswith("ttyS"):" block both times.

But it might be safer (and cleaner) to return an empty string if we're
not using a serial console. Expect a new patch in a minute or two.

-w


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]