<div dir="ltr">On 18 September 2017 at 19:41, Andre McCurdy <span dir="ltr">&lt;<a href="mailto:armccurdy@gmail.com" target="_blank">armccurdy@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Mon, Sep 18, 2017 at 8:17 AM, Burton, Ross &lt;<a href="mailto:ross.burton@intel.com">ross.burton@intel.com</a>&gt; wrote:<br>
&gt; On 18 September 2017 at 16:07, Peter Kjellerstedt<br>
&gt; &lt;<a href="mailto:peter.kjellerstedt@axis.com">peter.kjellerstedt@axis.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; &gt; -----Original Message-----<br>
&gt;&gt; &gt; From: <a href="mailto:openembedded-core-bounces@lists.openembedded.org">openembedded-core-bounces@<wbr>lists.openembedded.org</a><br>
&gt;&gt; &gt; [mailto:<a href="mailto:openembedded-core-bounces@lists.openembedded.org">openembedded-core-<wbr>bounces@lists.openembedded.org</a><wbr>] On Behalf Of<br>
&gt;&gt; &gt; Mike Looijmans<br>
&gt;&gt; &gt; Sent: den 18 september 2017 16:07<br>
&gt;&gt; &gt; To: <a href="mailto:openembedded-core@lists.openembedded.org">openembedded-core@lists.<wbr>openembedded.org</a><br>
&gt;&gt; &gt; Cc: Mike Looijmans &lt;<a href="mailto:mike.looijmans@topic.nl">mike.looijmans@topic.nl</a>&gt;; Peter Kjellerstedt<br>
&gt;&gt; &gt; &lt;<a href="mailto:peter.kjellerstedt@axis.com">peter.kjellerstedt@axis.com</a>&gt;<br>
&gt;&gt; &gt; Subject: [OE-core] [PATCH] base-files: profile: Get rid of &quot;resize&quot;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; The &quot;resize&quot; command actually outputs shell commands to be executed, for<br>
&gt;&gt; &gt; example:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; $ resize<br>
&gt;&gt; &gt; COLUMNS=102;<br>
&gt;&gt; &gt; LINES=27;<br>
&gt;&gt; &gt; export COLUMNS LINES;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; The output of &quot;resize&quot; is being discarded to /dev/null so the call has<br>
&gt;&gt; &gt; no<br>
&gt;&gt; &gt; effect whatsoever, and does not change the environment (it cannot change<br>
&gt;&gt; &gt; the<br>
&gt;&gt; &gt; environment of its parent). Remove the call and hence solve the messages<br>
&gt;&gt; &gt; about shells missing &quot;command&quot; or &quot;tty&quot; or &quot;resize&quot;.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Signed-off-by: Mike Looijmans &lt;<a href="mailto:mike.looijmans@topic.nl">mike.looijmans@topic.nl</a>&gt;<br>
&gt;&gt; &gt; ---<br>
&gt;&gt; &gt;  meta/recipes-core/base-files/<wbr>base-files/profile | 9 ---------<br>
&gt;&gt; &gt;  1 file changed, 9 deletions(-)<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; diff --git a/meta/recipes-core/base-<wbr>files/base-files/profile<br>
&gt;&gt; &gt; b/meta/recipes-core/base-<wbr>files/base-files/profile<br>
&gt;&gt; &gt; index a062028..cfd0d69 100644<br>
&gt;&gt; &gt; --- a/meta/recipes-core/base-<wbr>files/base-files/profile<br>
&gt;&gt; &gt; +++ b/meta/recipes-core/base-<wbr>files/base-files/profile<br>
&gt;&gt; &gt; @@ -20,15 +20,6 @@ if [ -d /etc/profile.d ]; then<br>
&gt;&gt; &gt;       unset i<br>
&gt;&gt; &gt;  fi<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; -if command -v resize &gt;/dev/null &amp;&amp; command -v tty &gt;/dev/null; then<br>
&gt;&gt; &gt; -     # Make sure we are on a serial console (i.e. the device used<br>
&gt;&gt; &gt; starts with<br>
&gt;&gt; &gt; -     # /dev/tty[A-z]), otherwise we confuse e.g. the eclipse launcher<br>
&gt;&gt; &gt; which<br>
&gt;&gt; &gt; -     # tries do use ssh<br>
&gt;&gt; &gt; -     case $(tty) in<br>
&gt;&gt; &gt; -             /dev/tty[A-z]*) resize &gt;/dev/null;;<br>
&gt;&gt; &gt; -     esac<br>
&gt;&gt; &gt; -fi<br>
&gt;&gt; &gt; -<br>
&gt;&gt; &gt;  export PATH PS1 OPIEDIR QPEDIR QTDIR EDITOR TERM<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;  umask 022<br>
&gt;&gt; &gt; --<br>
&gt;&gt; &gt; 1.9.1<br>
&gt;&gt;<br>
&gt;&gt; Hold on. Looking at busybox&#39; source code for resize, it seems that<br>
&gt;&gt; it actually does something besides outputting the shell code to<br>
&gt;&gt; set the variables (which is actually enabled by a separate feature<br>
&gt;&gt; called ENABLE_FEATURE_RESIZE_PRINT). It also calls<br>
&gt;&gt; ioctl(STDERR_FILENO, TIOCSWINSZ, &amp;w) where w contains the<br>
&gt;&gt; calculated sizes.<br>
&gt;<br>
&gt; My knowledge of ANSI escapes is incredibly sketchy, but isn&#39;t that the code<br>
&gt; to *get* the size of the screen?  Put the cursor at 999,999, then ask where<br>
&gt; it is?<br>
<br>
</div></div>The behaviour may have got broken with the various /etc/profile<br>
rewrites but it certainly did do something useful originally - it<br>
greatly improves usability for shells run on serial consoles. Please<br>
don&#39;t just remove it.<br></blockquote><div><br></div><div>The question is does it do something useful *now*?</div><div><br></div><div>Ross </div></div></div></div>