qemu-e2k/util
Richard Henderson f3a8bdc1d5 util/path: Do not cache all filenames at startup
If one uses -L $PATH to point to a full chroot, the startup time
is significant.  In addition, the existing probing algorithm fails
to handle symlink loops.

Instead, probe individual paths on demand.  Cache both positive
and negative results within $PATH, so that any one filename is
probed only once.

Use glib filename functions for clarity.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Tested-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20190519201953.20161-2-richard.henderson@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2019-06-24 22:19:30 +02:00
..
Makefile.objs util: compile drm.o on posix 2019-05-29 06:29:07 +02:00
aio-posix.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
aio-wait.c block: Use a single global AioWait 2018-09-25 15:50:15 +02:00
aio-win32.c aio-posix: Fix concurrent aio_poll/set_fd_handler. 2019-01-14 14:09:41 +00:00
aiocb.c block: move AioContext, QEMUTimer, main-loop to libqemuutil 2017-02-21 11:14:07 +00:00
async.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
atomic64.c util: add atomic64 2018-10-02 18:47:55 +02:00
base64.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
bitmap.c bitmap: provide to_le/from_le helpers 2017-09-22 14:11:25 +02:00
bitops.c avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
buffer.c qemu-common: stop including qemu/host-utils.h from qemu-common.h 2016-05-19 16:42:28 +02:00
bufferiszero.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
cacheinfo.c util/cacheinfo: Use uint64_t on LLP64 model to satisfy Windows ARM64 2019-05-07 12:55:03 +01:00
compatfd.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
coroutine-sigaltstack.c coroutine-sigaltstack: use helper for allocating stack memory 2016-09-29 14:13:39 +02:00
coroutine-ucontext.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
coroutine-win32.c coroutine: add a macro for the coroutine stack size 2016-09-29 14:13:39 +02:00
crc32c.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
cutils.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
drm.c util: promote qemu_egl_rendernode_open() to libqemuutil 2018-08-27 10:51:44 +02:00
envlist.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
error.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
event_notifier-posix.c Revert "qemu: add a cleanup callback function to EventNotifier" 2018-01-24 19:20:19 +02:00
event_notifier-win32.c Revert "qemu: add a cleanup callback function to EventNotifier" 2018-01-24 19:20:19 +02:00
fifo8.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
filemonitor-inotify.c filemon: fix watch IDs to avoid potential wraparound issues 2019-04-02 13:52:02 +01:00
filemonitor-stub.c filemon: fix watch IDs to avoid potential wraparound issues 2019-04-02 13:52:02 +01:00
getauxval.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
guest-random.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
hbitmap.c Revert "hbitmap: Add @advance param to hbitmap_iter_next()" 2019-01-15 18:26:50 -05:00
hexdump.c util: Improved qemu_hexmap() to include an ascii dump of the buffer 2016-04-06 09:52:07 +08:00
host-utils.c host-utils: Implement unsigned quadword left/right shift and unit tests 2017-01-31 10:10:14 +11:00
id.c qemu-common: Move qemu_isalnum() etc. to qemu/ctype.h 2019-06-11 20:22:09 +02:00
iohandler.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
iov.c util: Fix assertion in iov_copy() upon zero 'bytes' and non-zero 'offset' 2016-08-03 18:44:57 +02:00
iova-tree.c util: remove redundant include of glib.h and add osdep.h 2018-06-29 12:22:28 +01:00
keyval.c qobject: Replace qobject_incref/QINCREF qobject_decref/QDECREF 2018-05-04 08:27:53 +02:00
lockcnt.c qemu-thread: optimize QemuLockCnt with futexes on Linux 2017-01-16 13:25:18 +00:00
log.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
main-loop.c util/main-loop: Fix incorrect assertion 2019-06-21 13:25:29 +02:00
memfd.c memfd: improve error messages 2019-03-11 17:17:01 -03:00
mmap-alloc.c util/mmap-alloc: support MAP_SYNC in qemu_ram_mmap() 2019-04-25 14:17:36 -03:00
module.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
notify.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
osdep.c slirp: prefer c99 types over BSD kind 2019-02-07 15:49:08 +02:00
oslib-posix.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
oslib-win32.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
pagesize.c util: move qemu_real_host_page_size/mask to osdep.h 2017-10-10 09:45:00 -07:00
path.c util/path: Do not cache all filenames at startup 2019-06-24 22:19:30 +02:00
qdist.c qdist: return "(empty)" instead of NULL when printing an empty dist 2016-08-03 18:44:56 +02:00
qemu-config.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
qemu-coroutine-io.c coroutine: move entry argument to qemu_coroutine_create 2016-07-13 13:26:02 +02:00
qemu-coroutine-lock.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
qemu-coroutine-sleep.c qemu-coroutine-sleep: drop CoSleepCB 2019-01-24 10:05:16 +00:00
qemu-coroutine.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
qemu-error.c monitor error: Make printf()-like functions return a value 2019-04-18 22:18:59 +02:00
qemu-openpty.c util: Clean up includes 2016-02-04 17:01:04 +00:00
qemu-option.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
qemu-print.c qemu-print: New qemu_fprintf(), qemu_vfprintf() 2019-04-18 22:18:59 +02:00
qemu-progress.c progress: Show current progress on SIGINFO 2017-04-28 18:48:11 +02:00
qemu-sockets.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
qemu-thread-common.h Clean up includes 2018-12-20 10:29:08 +01:00
qemu-thread-posix.c qemu-thread: Don't block SEGV, ILL and FPE 2019-01-08 12:34:46 +00:00
qemu-thread-win32.c build-sys: build with Vista API by default 2019-01-11 13:57:25 +01:00
qemu-timer-common.c util: Clean up includes 2016-02-04 17:01:04 +00:00
qemu-timer.c qemu-timer: avoid checkpoints for virtual clock timers in external subsystems 2018-10-19 13:44:03 +02:00
qht.c qht: constify arguments to some internal functions 2018-09-26 08:55:54 -07:00
qsp.c qsp: Simplify how qsp_report() prints 2019-04-18 22:18:59 +02:00
range.c Don't talk about the LGPL if the file is licensed under the GPL 2019-01-30 10:51:20 +01:00
rcu.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
readline.c qemu-common: Move qemu_isalnum() etc. to qemu/ctype.h 2019-06-11 20:22:09 +02:00
stats64.c util/stats64: Fix min/max comparisons 2017-11-15 09:34:51 +01:00
sys_membarrier.c sys_membarrier: fix up include directives 2018-04-05 14:37:38 +02:00
systemd.c qemu-ga: obey LISTEN_PID when using systemd socket activation 2017-03-19 11:12:12 +01:00
thread-pool.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
throttle.c throttle: Assert that bkt->max is valid in throttle_compute_wait() 2017-09-26 14:46:23 +02:00
timed-average.c Fix some typos found by codespell 2016-05-18 15:04:27 +03:00
trace-events filemon: fix watch IDs to avoid potential wraparound issues 2019-04-02 13:52:02 +01:00
unicode.c json: Reject invalid UTF-8 sequences 2018-08-24 20:26:37 +02:00
uri.c cutils: Provide strchrnul 2018-06-29 12:32:10 +02:00
uuid.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
vfio-helpers.c exec: Change RAMBlockIterFunc definition 2019-03-06 10:49:17 +00:00