uboot-envtools: update to 2024.01
[openwrt/staging/jow.git] / package / boot / uboot-envtools / patches / 002-Revert-tools-env-use-run-to-store-lockfile.patch
1 Revert "tools: env: use /run to store lockfile"
2
3 In OpenWRT we still use /var/lock as default location for lock files and
4 /run might not even exist. Revert the upstream change and restore the
5 previous default path.
6
7 This reverts upstream commit
8 https://source.denx.de/u-boot/u-boot/-/commit/aeb40f1166e072856f865d26d42a4bea1ec3a514
9 ---
10 tools/env/fw_env_main.c | 6 +++---
11 1 file changed, 3 insertions(+), 3 deletions(-)
12
13 --- a/tools/env/fw_env_main.c
14 +++ b/tools/env/fw_env_main.c
15 @@ -73,7 +73,7 @@ void usage_printenv(void)
16 " -c, --config configuration file, default:" CONFIG_FILE "\n"
17 #endif
18 " -n, --noheader do not repeat variable name in output\n"
19 - " -l, --lock lock node, default:/run\n"
20 + " -l, --lock lock node, default:/var/lock\n"
21 "\n");
22 }
23
24 @@ -88,7 +88,7 @@ void usage_env_set(void)
25 #ifdef CONFIG_FILE
26 " -c, --config configuration file, default:" CONFIG_FILE "\n"
27 #endif
28 - " -l, --lock lock node, default:/run\n"
29 + " -l, --lock lock node, default:/var/lock\n"
30 " -s, --script batch mode to minimize writes\n"
31 "\n"
32 "Examples:\n"
33 @@ -206,7 +206,7 @@ int parse_setenv_args(int argc, char *ar
34
35 int main(int argc, char *argv[])
36 {
37 - char *lockname = "/run/" CMD_PRINTENV ".lock";
38 + char *lockname = "/var/lock/" CMD_PRINTENV ".lock";
39 int lockfd = -1;
40 int retval = EXIT_SUCCESS;
41 char *_cmdname;