This allows flexibility to specify a starting position from where to search
for the first occurrence of the search string. By default,
the position is set to 0 and the function will behave as before.
However, when a position is provided,
the function will replace only the first occurrence of
the search string after that position.
Origin commit data
------------------
Commit: 912f256276
Author: Thilo Graf <dbt@novatux.de>
Date: 2023-03-07 (Tue, 07 Mar 2023)
cc1plus: warning: function may return address of local variable [-Wreturn-local-addr]
../src/system/helpers.cpp:114:16: note: declared here
std::string res = s.str();
^~~
Origin commit data
------------------
Commit: 86e0ee951d
Author: vanhofen <vanhofen@gmx.de>
Date: 2022-04-18 (Mon, 18 Apr 2022)
Origin message was:
------------------
- helpers: fix warning in neutrinoMode_to_string();
cc1plus: warning: function may return address of local variable [-Wreturn-local-addr]
../src/system/helpers.cpp:114:16: note: declared here
std::string res = s.str();
^~~
Our buildsystem/image (Yocto/OE) is using systemctl as default and we have defined 'systemctl' as
3rd parameter (e.g. see drivers/lcd4l.cpp), but users of our source could
use systems without 'systemctl' in their own buildsystems/images,
therefore it makes sense to have a fallback to 'service'.
This should avoid patching the sources.
Thx GetAway for hint.
Origin commit data
------------------
Commit: 8870512979
Author: Thilo Graf <dbt@novatux.de>
Date: 2021-07-13 (Tue, 13 Jul 2021)
Enabled only on generic hardware.
Thanks seife for hint.
Origin commit data
------------------
Commit: 33a282527c
Author: Thilo Graf <dbt@novatux.de>
Date: 2021-06-30 (Wed, 30 Jun 2021)
Possible error is:
terminate called after throwing an instance of 'std::logic_error'
Origin commit data
------------------
Commit: d9c894a1e3
Author: Thilo Graf <dbt@novatux.de>
Date: 2021-06-28 (Mon, 28 Jun 2021)
Current behavior is untouched, but return value is boolean
and so far, the function obviously has returned true on error. So far this
was currently not evaluated but is changed now. Otherwise, "bool" makes
not really sense or was this intended?
Origin commit data
------------------
Commit: d2d22e5748
Author: Thilo Graf <dbt@novatux.de>
Date: 2021-06-22 (Tue, 22 Jun 2021)
For flexible usage of timeout in related downloadUrl methods if required.
Origin commit data
------------------
Commit: 7cabce4b80
Author: Thilo Graf <dbt@novatux.de>
Date: 2020-11-16 (Mon, 16 Nov 2020)
switch expression is 'int', but f_type gets stored as 'long unsigned int' on 32-bit machines since it may not fit otherwise. Recent compilers diagnose this and bail out with:
../../../git/src/system/helpers.cpp:330:9: error: narrowing conversion of '2240043254' from 'long unsigned int' to 'int' [-Wnarrowing]
casting the switch expression to long unsigned int seems to be the solution.
in short: this fixes the build for 32-bit machines with gcc ≥ 10.x
Signed-off-by: Markus Volk <f_l_k@t-online.de>
Origin commit data
------------------
Commit: 1d73d07f22
Author: Markus Volk <f_l_k@t-online.de>
Date: 2020-08-04 (Tue, 04 Aug 2020)
Origin commit data
------------------
Commit: b4b3264967
Author: vanhofen <vanhofen@gmx.de>
Date: 2019-12-21 (Sat, 21 Dec 2019)
Origin message was:
------------------
- update: move function to get active partition to helpers.cpp
returns true if all chars of string parameter are digits
Origin commit data
------------------
Commit: 205bbeb7ce
Author: Thilo Graf <dbt@novatux.de>
Date: 2019-03-28 (Thu, 28 Mar 2019)
Usage of debug level INFO should be enough.
Origin commit data
------------------
Commit: 4adec299c9
Author: Thilo Graf <dbt@novatux.de>
Date: 2018-10-28 (Sun, 28 Oct 2018)
* introduceand use LOGODIR_TMP (storage dir for webchannel logos)
Origin commit data
------------------
Commit: 2d3f66aa39
Author: vanhofen <vanhofen@gmx.de>
Date: 2018-09-18 (Tue, 18 Sep 2018)
Origin message was:
------------------
- helpers: rework new random-functions to get the code more reuseable
* introduceand use LOGODIR_TMP (storage dir for webchannel logos)