diff options
Diffstat (limited to 'meta/recipes-devtools/unfs3/unfs3/fix_compile_warning.patch')
-rw-r--r-- | meta/recipes-devtools/unfs3/unfs3/fix_compile_warning.patch | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/meta/recipes-devtools/unfs3/unfs3/fix_compile_warning.patch b/meta/recipes-devtools/unfs3/unfs3/fix_compile_warning.patch new file mode 100644 index 0000000000..604824a230 --- /dev/null +++ b/meta/recipes-devtools/unfs3/unfs3/fix_compile_warning.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | daemon.c: Check exit code of chdir() | ||
2 | |||
3 | Stop the compile warning and fix the code to act on a chdir() failure. | ||
4 | If this one does fail something is very, very wrong. | ||
5 | |||
6 | Signed-off-by: Jason Wessel <jason.wessel@windriver.com> | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | |||
10 | --- | ||
11 | daemon.c | 3 ++- | ||
12 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
13 | |||
14 | --- a/daemon.c | ||
15 | +++ b/daemon.c | ||
16 | @@ -964,7 +964,8 @@ int main(int argc, char **argv) | ||
17 | sigaction(SIGALRM, &act, NULL); | ||
18 | |||
19 | /* don't make directory we started in busy */ | ||
20 | - chdir("/"); | ||
21 | + if(chdir("/") < 0) | ||
22 | + daemon_exit(0); | ||
23 | |||
24 | /* detach from terminal */ | ||
25 | if (opt_detach) { | ||