lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 1 Dec 2023 12:05:31 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Arnaldo Carvalho de Melo' <acme@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>
CC:     Ian Rogers <irogers@...gle.com>,
        Adrian Hunter <adrian.hunter@...el.com>,
        Jiri Olsa <jolsa@...nel.org>,
        "linux-perf-users@...r.kernel.org" <linux-perf-users@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 1/1] perf beauty: Don't use 'find ... -printf' as it isn't
 available in busybox

...
>  # Create list of architectures that have a specific errno.h.
>  archlist=""
> -for arch in $(find $toolsdir/arch -maxdepth 1 -mindepth 1 -type d -printf "%f\n" | sort -r); do
> +for arch in $(find $toolsdir/arch -maxdepth 1 -mindepth 1 -type d | while read arch ; do basename
> $arch ; done | sort -r); do
>  	test -f $toolsdir/arch/$arch/include/uapi/asm/errno.h && archlist="$archlist $arch"
>  done

Jeepers ...
Does this work?
	for f in $toolsdir/arch/*/include/uapi/asm/errno.h; do
		[ ! -f $f ] && break
		d=${f%/include/uapi/asm/errno.h}
		archlist="${d##*/} $archlist"
	done
No fork()s or exec()s.
I think it only differs in having a trailing space instead of a leading one.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ