OSDN Git Service

Restore the "print" builtin.
authorElliott Hughes <enh@google.com>
Wed, 21 Dec 2016 18:59:39 +0000 (10:59 -0800)
committergitbuildkicker <android-build@google.com>
Thu, 22 Dec 2016 01:36:34 +0000 (17:36 -0800)
commitbc44eaeb65c0182e8fb2e86434cdab7cfa930a5d
treed283a335c6273e68150c34854d1bbb03f5c98cc2
parentbf7d94027a1b909786cd11af57d4212c03905f9f
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
(cherry picked from commit 3d9915284b3d2b49b32be3261991f19f77345f2e)
src/funcs.c