Skip to contentSkip to conversation

base-files:fix the command line wrap around issue

PATCH In review [email protected] 3 participants 9 messages May 21, 2013 – May 30, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 base-files:fix the command line wrap around issue

From: Zongchun Yu <[email protected]>

when the character number of cmdline is more than 80. the following character should go to a new line. rather than cover the prompt and the inputting character before.

---
 meta/recipes-core/base-files/base-files/profile |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
meta/recipes-core/base-files/base-files/profile +1 -0
index 8eeaac3..f58ae3d 100644
@@ -27,6 +27,7 @@ if [ -d /etc/profile.d ]; then
 fi
 
 export PATH PS1 OPIEDIR QPEDIR QTDIR EDITOR TERM
+export COLUMNS=2000
 
 umask 022
 
Signature · 1 line
1.6.2.5
#1 lore raw
Quoted 2 lines · On Tuesday, 21 May 2013, wrote:

+export COLUMNS=2000

But there are not 2000 columns, you're just hard-coding a value that is expected to dynamically change.

i.e, on my desktop in a gnome-terminal:

$ echo $COLUMNS
80

Then if I resize the window:

$ echo $COLUMNS
117

This is a bad workaround, can you explain the actual problem? Are you not seeing wrapping at a VT, in a terminal, or what?

Ross

#2 lore raw

Hello Ross.

Thanks for your comments, I am sorry. the description is not clear. please see the below content:

Sometimes we may use long commands. For example:

Normal display:

user@host:~cmd arg1 arg2 arg3 arg4 arg5…………argn-1 argn

| |

1 80

Our board display:

argn@host:~cmd arg1 arg2 arg3 arg4 arg5…………argn-1

| |

1 80

When the number of character is more than 80, the following character

will cover the character before. I.e “argn” cover “user”.

We tried to add "if [ -f /usr/bin/resize ]; then /usr/bin/resize > /dev/null; fi" to /etc/profile before.

But when we boot up the board and login using our test tool, we met some invalid characters.

So we give up the choice and only add “COLUMNS=2000” to /etc/profile.

I know it is a bad workaround, Do you have a good method to overcome the issue?

Best Regards

Zongchun

发件人: Burton, Ross [mailto:[email protected]]
发送时间: 2013年5月21日 17:31
收件人: [email protected]; OE-core
主题: Re: [OE-core] [PATCH] base-files:fix the command line wrap around issue

On Tuesday, 21 May 2013, wrote:

+export COLUMNS=2000

But there are not 2000 columns, you're just hard-coding a value that is expected to dynamically change.

i.e, on my desktop in a gnome-terminal:

$ echo $COLUMNS

80

Then if I resize the window:

$ echo $COLUMNS

117

This is a bad workaround, can you explain the actual problem? Are you not seeing wrapping at a VT, in a terminal, or what?

Ross

#4 lore raw
Quoted 6 lines · Zongchun YU

Hello Ross.****

** **

Do you have any other comments about this patch?

It seems that setting it in environment is a workaround for the real issue. Can't the same be accomplished changing busybox settings?

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#5 lore raw

It seems that setting it in environment is a workaround for the real issue. Can't the same be accomplished changing busybox settings?

Can you explain your idea in detail? Do you mean changing the setting of “resize” in busybox or other?

Thank you very much!

Best Regards

Zongchun

发件人: [email protected] [mailto:[email protected]] 代表 Otavio Salvador
发送时间: Tuesday, May 28, 2013 11:15 AM
收件人: Zongchun YU
抄送: Burton, Ross; OE-core
主题: Re: [OE-core] [PATCH] base-files:fix the command line wrap around issue

On Mon, May 27, 2013 at 11:51 PM, Zongchun YU <[email protected]> wrote:

Hello Ross.

Do you have any other comments about this patch?

It seems that setting it in environment is a workaround for the real issue. Can't the same be accomplished changing busybox settings?

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#6 lore raw
Quoted 5 lines · Zongchun YU

It seems that setting it in environment is a workaround for the real issue. Can't the same be accomplished changing busybox settings?

Can you explain your idea in detail? Do you mean changing the setting of “resize” in busybox or other?

Yes. At least for my target, CONFIG_RESIZE isn't enabled that I'd expect to be required for this to work.

Ross

#7 lore raw

Yes. At least for my target, CONFIG_RESIZE isn't enabled that I'd expect to be required for this to work.

for my target, CONFIG_RESIZE have been enabled, if we use resize in profile, we may meet the invalid character issue as I mentioned earlier.

#8 lore raw
Quoted 6 lines · Zongchun YU

Yes. At least for my target, CONFIG_RESIZE isn't enabled that I'd expect to be required for this to work.

for my target, CONFIG_RESIZE have been enabled, if we use resize in profile, we may meet the invalid character issue as I mentioned earlier.

I think we need to find the cause of the invalid character; your proposed patch is a workaround and not a fix for the real issue.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750