mwan3: add new readfile function to speedup variable read from file
authorEtienne Champetier <[email protected]>
Fri, 11 Jul 2025 21:23:28 +0000 (17:23 -0400)
committerFlorian Eckert <[email protected]>
Fri, 1 Aug 2025 11:03:01 +0000 (13:03 +0200)
commitf93b00fa686ad689a59484e4a2905c2fc9a6c875
treeff91f11117e9aa7af802cce6496418152909bba3
parent50be11c61855740f09b835eb5fab7fac1e70f1b3
mwan3: add new readfile function to speedup variable read from file

This is a preparation for adding an utility function readfile() to read
directly to a variable. Using '$(cat ...)' causes a fork/execve which is
extremely slow just to read '~2' chars.

(commit message from Florian Eckert)
Signed-off-by: Etienne Champetier <[email protected]>
net/mwan3/files/lib/mwan3/common.sh