Patchwork sysvinit-inittab: Fix getting tty device name from SERIAL_CONSOLES entries

login
register
mail settings
Submitter Noor Ahsan
Date Oct. 21, 2013, 12:45 p.m.
Message ID <365E1805BC95084CBE82381A0B869994DE53BF6B@EU-MBX-01.mgc.mentorg.com>
Download mbox | patch
Permalink /patch/60315/
State New
Headers show

Comments

Noor Ahsan - Oct. 21, 2013, 12:45 p.m.
Hello,

Kindly merge this patch we need it for Yocto 1.5.

Noor

-----Original Message-----
From: openembedded-core-bounces@lists.openembedded.org [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of Shakeel, Muhammad
Sent: Monday, October 07, 2013 8:05 PM
To: openembedded-core@lists.openembedded.org
Subject: [OE-core] [PATCH] sysvinit-inittab: Fix getting tty device name from SERIAL_CONSOLES entries

From: Muhammad Shakeel <muhammad_shakeel@mentor.com>

Currently the part after "tty" in the device name go into label along with everything after that part. For example if SERIAL_CONSOLES="115200;vt100;ttyS0"
than label=S0 but if SERIAL_CONSOLES="115200;ttyS0;vt100" than label=S0;vt100.
If SERIAL_CONSOLES="..;ttyX;..", part after 'X' should also be trimmed.

Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com>
---
 .../sysvinit/sysvinit-inittab_2.88dsf.bb           |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
1.7.9.5

Patch

diff --git a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
index 23c284d..05ba410 100644
--- a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
+++ b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
@@ -22,7 +22,7 @@  do_install() {
     for i in $tmp
     do
 	j=`echo ${i} | sed s/\;/\ /g`
-	label=`echo ${i} | sed -e 's/^.*;tty//'`
+	label=`echo ${i} | sed -e 's/^.*;tty//' -e 's/;.*//'`
 	echo "$label:12345:respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab
     done