Reduce size of wrap.c
-
pv-adverb: Avoid jumping past initialization
When we add proper error-checking for determining the path to /proc/self/exe, which will be done in a subsequent commit, it will involve a 'goto out' that jumps past initialization of this variable.
-
pv-adverb, pv-wrap: Factor out _srt_find_executable_dir
This reduces the size of wrap.c, which is (still) uncomfortably large, and cannot easily be unit-tested because it contains main().
This incidentally also adds error-checking to the use in pv-adverb, which previously did not check for errors when reading /proc/self/exe.
-
pv-wrap: Factor out pv_wrap_maybe_load_nvidia_modules
This reduces the size of wrap.c, which is too big.
Edited by Simon McVittie