From: Vitaliy Ivanov Date: Tue, 26 Jul 2011 00:12:50 +0000 (-0700) Subject: uml: cow_user.c warning corrections X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7a99ae7c57d2de5cad9562bed32addf064521116;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git uml: cow_user.c warning corrections Fix this warning: 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 [richard@nod.at: happens only with -D_FORTIFY_SOURCE=2] Signed-off-by: Vitaliy Ivanov Signed-off-by: Richard Weinberger Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/um/drivers/cow_user.c b/arch/um/drivers/cow_user.c index 93f227a25ba4..9cbb426c0b91 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; }