1*517393d9SAndrew GeisslerFrom 935a31dd6f14bd1aff735495f0fdbae4ca05c695 Mon Sep 17 00:00:00 2001
2*517393d9SAndrew GeisslerFrom: Changqing Li <changqing.li@windriver.com>
3*517393d9SAndrew GeisslerDate: Fri, 2 Dec 2022 15:35:40 +0800
4*517393d9SAndrew GeisslerSubject: [PATCH] tests/toolbox.inc.sh: update regex for getting endian
5*517393d9SAndrew Geissler
6*517393d9SAndrew GeisslerUpdate regex for getting endian in following condition:
7*517393d9SAndrew Geissler/proc/777/exe: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2
8*517393d9SAndrew Geissler
9*517393d9SAndrew GeisslerUpstream-Status: Submited [Submitted to keyrings@vger.kernel.org ]
10*517393d9SAndrew Geissler
11*517393d9SAndrew GeisslerSigned-off-by: Changqing Li <changqing.li@windriver.com>
12*517393d9SAndrew Geissler---
13*517393d9SAndrew Geissler tests/toolbox.inc.sh | 4 ++--
14*517393d9SAndrew Geissler 1 file changed, 2 insertions(+), 2 deletions(-)
15*517393d9SAndrew Geissler
16*517393d9SAndrew Geisslerdiff --git a/tests/toolbox.inc.sh b/tests/toolbox.inc.sh
17*517393d9SAndrew Geisslerindex 1964450..e827e20 100644
18*517393d9SAndrew Geissler--- a/tests/toolbox.inc.sh
19*517393d9SAndrew Geissler+++ b/tests/toolbox.inc.sh
20*517393d9SAndrew Geissler@@ -13,10 +13,10 @@
21*517393d9SAndrew Geissler echo === $OUTPUTFILE ===
22*517393d9SAndrew Geissler
23*517393d9SAndrew Geissler endian=`file -L /proc/$$/exe`
24*517393d9SAndrew Geissler-if expr "$endian" : '.* MSB \+\(executable\|shared object\).*' >&/dev/null
25*517393d9SAndrew Geissler+if expr "$endian" : '.* MSB .*\(executable\|shared object\).*' >&/dev/null
26*517393d9SAndrew Geissler then
27*517393d9SAndrew Geissler     endian=BE
28*517393d9SAndrew Geissler-elif expr "$endian" : '.* LSB \+\(executable\|shared object\).*' >&/dev/null
29*517393d9SAndrew Geissler+elif expr "$endian" : '.* LSB .*\(executable\|shared object\).*' >&/dev/null
30*517393d9SAndrew Geissler then
31*517393d9SAndrew Geissler     endian=LE
32*517393d9SAndrew Geissler else
33*517393d9SAndrew Geissler--
34*517393d9SAndrew Geissler2.25.1
35*517393d9SAndrew Geissler
36