OSDN Git Service

Restore the "print" builtin.
authorElliott Hughes <enh@google.com>
Wed, 21 Dec 2016 18:59:39 +0000 (10:59 -0800)
committerElliott Hughes <enh@google.com>
Wed, 21 Dec 2016 18:59:39 +0000 (10:59 -0800)
commit3d9915284b3d2b49b32be3261991f19f77345f2e
treed283a335c6273e68150c34854d1bbb03f5c98cc2
parentceb0b57de28e9505f1dc324c037d3d5323dc7576
Restore the "print" builtin.

otapreopt_script is currently using this. We should probably move it onto
the more portable echo or printf, but for now I'm assuming there's a reason
why print is being used --- the use of -u implies isn't not just a typo for
printf.

(Even if we can switch to echo or printf, I'm tempted to just leave print be
anyway, since unlike the other disabled mksh builtins, it's not shadowing a
better implementation, so it's not causing confusion about why the "same"
command in different contexts behaves differently. The worst it will do is
cause portability problems if we move away from mksh, and in the meantime
print is documented on the mksh man page for users sophisticated enough to
know that we're using mksh, so it's arguably more surprising for it to be
missing.)

Bug: http://b/33761687
Test: manual
Change-Id: I440d759a3c4ef6fa24fd496ea832093e18b7060e
src/funcs.c