From: Vitaliy Ivanov <[email protected]>

arch/um/drivers/cow_user.c: In function ‘absolutize’:
arch/um/drivers/cow_user.c:189:7: warning: ignoring return value of ‘chdir’, 
declared with attribute warn_unused_result

Signed-off-by: Vitaliy Ivanov <[email protected]>
[[email protected]: happens only with -D_FORTIFY_SOURCE=2]
Signed-off-by: Richard Weinberger <[email protected]>
---
 arch/um/drivers/cow_user.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/arch/um/drivers/cow_user.c b/arch/um/drivers/cow_user.c
index 93f227a..9cbb426 100644
--- a/arch/um/drivers/cow_user.c
+++ b/arch/um/drivers/cow_user.c
@@ -186,7 +186,11 @@ static int absolutize(char *to, int size, char *from)
                strcat(to, "/");
                strcat(to, from);
        }
-       chdir(save_cwd);
+       if (chdir(save_cwd)) {
+               cow_printf("absolutize : Can't cd to '%s' - "
+                          "errno = %d\n", save_cwd, errno);
+               return -1;
+       }
        return 0;
 }
 
-- 
1.7.6


------------------------------------------------------------------------------
5 Ways to Improve & Secure Unified Communications
Unified Communications promises greater efficiencies for business. UC can 
improve internal communications as well as offer faster, more efficient ways
to interact with customers and streamline customer service. Learn more!
http://www.accelacomm.com/jaw/sfnl/114/51426253/
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

Reply via email to