Bug 589773 is caused by booty's x86 flag.serial handling not setting
self.serial at all, when serial is present on the cmdline, but no
console= argument it present and the system is not ia64.
Looking closer at the code I also noticed that it will try to
access the options list at index 1, even though it is empty, when
console=ttyS0 is passed rather then console=ttyS0,...
All in all the code was rather messy, so this patch rewrites it to
better readable, hopefully obviously correct code.
---
booty/bootloaderInfo.py | 43 ++++++++++++++++++++-----------------------
1 files changed, 20 insertions(+), 23 deletions(-)
# this has somewhat strange semantics. if 0, act like a normal
# "install" case. if 1, update lilo.conf (since grubby won't do that)
@@ -567,34 +570,28 @@ class bootloaderInfo(object):
self._drivelist = None
- # the options are everything after the comma
- comma = console.find(",")
- if comma != -1:
- options = console[comma:]
- device = console[:comma]
+ console = flags.cmdline.get("console", "")
+ if console:
+ # the options are everything after the comma
+ comma = console.find(",")
+ if comma != -1:
+ self.serialDevice = console[:comma]
+ self.serialOptions = console[comma + 1:]
+ else:
+ self.serialDevice = console
+ self.serialOptions = ""
else:
- device = console
-
- if not device and iutil.isIA64():
self.serialDevice = "ttyS0"
self.serialOptions = ""
+
+ if self.serialOptions:
+ self.args.append("console=%s,%s" %(self.serialDevice,
+ self.serialOptions))
else:
- self.serialDevice = device
- # don't keep the comma in the options
- self.serialOptions = options[1:]
-
- if self.serialDevice:
- self.args.append("console=%s%s" %(self.serialDevice, options))
- self.serial = 1
- self.timeout = 5
- else:
- self.serial = 0
- self.serialDevice = None
- self.serialOptions = None
+ self.args.append("console=%s,%s" % self.serialDevice)
if flags.virtpconsole is not None:
if flags.virtpconsole.startswith("/dev/"):
--
1.7.0.1
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
05-10-2010, 03:55 PM
"Brian C. Lane"
cleanup booty x86 flag.serial handling (#589773)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 05/10/2010 05:28 AM, Hans de Goede wrote:
> Bug 589773 is caused by booty's x86 flag.serial handling not setting
> self.serial at all, when serial is present on the cmdline, but no
> console= argument it present and the system is not ia64.
>
> Looking closer at the code I also noticed that it will try to
> access the options list at index 1, even though it is empty, when
> console=ttyS0 is passed rather then console=ttyS0,...
>
> All in all the code was rather messy, so this patch rewrites it to
> better readable, hopefully obviously correct code.
> ---
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
05-11-2010, 09:41 AM
Hans de Goede
cleanup booty x86 flag.serial handling (#589773)
Hi,
On 05/10/2010 05:55 PM, Brian C. Lane wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 05/10/2010 05:28 AM, Hans de Goede wrote:
Bug 589773 is caused by booty's x86 flag.serial handling not setting
self.serial at all, when serial is present on the cmdline, but no
console= argument it present and the system is not ia64.
Looking closer at the code I also noticed that it will try to
access the options list at index 1, even though it is empty, when
console=ttyS0 is passed rather then console=ttyS0,...
All in all the code was rather messy, so this patch rewrites it to
better readable, hopefully obviously correct code.
---