[haiku-commits] haiku: hrev53048 - src/system/runtime_loader

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 7 Apr 2019 13:50:39 -0400 (EDT)

hrev53048 adds 1 changeset to branch 'master'
old head: a0710a23d2c784b56167b8efe0db27e8b2dcc6eb
new head: 938d81f65894443dc5a614aa90faaca679aa3ec7
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=938d81f65894+%5Ea0710a23d2c7

----------------------------------------------------------------------------

938d81f65894: runtime_loader: Rewrite all "/usr/bin/" shebangs to "/bin/".
  
  Previously we only rewrote ones pointing to "env" with that.
  
  Change-Id: I775fedc4a3b8e0e590c76f50f4c3fb259c5df32c
  Reviewed-on: https://review.haiku-os.org/c/1389
  Reviewed-by: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
  Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

                              [ Augustin Cavalier <waddlesplash@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev53048
Commit:      938d81f65894443dc5a614aa90faaca679aa3ec7
URL:         https://git.haiku-os.org/haiku/commit/?id=938d81f65894
Author:      Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date:        Sat Apr  6 17:51:51 2019 UTC
Committer:   waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Sun Apr  7 17:50:31 2019 UTC

----------------------------------------------------------------------------

1 file changed, 2 insertions(+), 2 deletions(-)
src/system/runtime_loader/runtime_loader.cpp | 4 ++--

----------------------------------------------------------------------------

diff --git a/src/system/runtime_loader/runtime_loader.cpp 
b/src/system/runtime_loader/runtime_loader.cpp
index b92f01eb1e..1cdc9056d5 100644
--- a/src/system/runtime_loader/runtime_loader.cpp
+++ b/src/system/runtime_loader/runtime_loader.cpp
@@ -371,8 +371,8 @@ fixup_shebang(char *invoker)
                ++current;
        }
 
-       // replace /usr/bin/env with /bin/env
-       if (memcmp(commandStart, "/usr/bin/env", current - commandStart) == 0)
+       // replace /usr/bin/ with /bin/
+       if (memcmp(commandStart, "/usr/bin/", current - commandStart) == 0)
                memmove(commandStart, commandStart + 4, strlen(commandStart + 
4) + 1);
 }
 


Other related posts:

  • » [haiku-commits] haiku: hrev53048 - src/system/runtime_loader - waddlesplash