ash: [REDIR] Replace GPL noclobberopen code with the FreeBSD version
authorDenys Vlasenko <vda.linux@googlemail.com>
Tue, 25 Jul 2017 15:47:48 +0000 (17:47 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Tue, 25 Jul 2017 15:47:48 +0000 (17:47 +0200)
commitf1a5cb0548f647e628032ea8645c0d0d2d07b02f
tree6063135a5059b3f137322726699e33e91c6ba095
parent2990aa45d188b1d9814c89dd44658f068eb37e83
ash: [REDIR] Replace GPL noclobberopen code with the FreeBSD version

Upstream commit:

    Date: Thu, 10 Mar 2011 16:52:13 +0800
    [REDIR] Replace GPL noclobberopen code with the FreeBSD version

    Replace noclobberopen() from bash with the FreeBSD code for noclobber
    opens.

    This also reduces code size by eliminating an unnecessary check.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
function                                             old     new   delta
changepath                                           192     194      +2
localcmd                                             366     364      -2
expmeta                                              521     517      -4
redirect                                            1210    1135     -75
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/3 up/down: 2/-81)             Total: -79 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
shell/ash.c