linux-um archives
 help / color / mirror / Atom feed
* [uml-devel] [PATCH 01/10] uml: cow_user.c warning corrections
@ 2011-07-21  9:18 Richard Weinberger
  2011-07-21  9:18 ` [uml-devel] [PATCH 02/10] uml: helper.c " Richard Weinberger
                   ` (8 more replies)
  0 siblings, 9 replies; 14+ messages in thread
From: Richard Weinberger @ 2011-07-21  9:18 UTC (permalink / raw)
  To: akpm
  Cc: Richard Weinberger, Vitaliy Ivanov, linux-kernel,
	user-mode-linux-devel

From: Vitaliy Ivanov <vitalivanov@gmail.com>

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 <vitalivanov@gmail.com>
[richard@nod.at: happens only with -D_FORTIFY_SOURCE=2]
Signed-off-by: Richard Weinberger <richard@nod.at>
---
 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
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2011-07-23 12:15 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-21  9:18 [uml-devel] [PATCH 01/10] uml: cow_user.c warning corrections Richard Weinberger
2011-07-21  9:18 ` [uml-devel] [PATCH 02/10] uml: helper.c " Richard Weinberger
2011-07-21  9:18 ` [uml-devel] [PATCH 03/10] uml: drivers/slip_user.c memory leak fix Richard Weinberger
2011-07-21  9:18 ` [uml-devel] [PATCH 04/10] uml: free resources Richard Weinberger
2011-07-21  9:18 ` [uml-devel] [PATCH 05/10] um: Disable scan_elf_aux() on x86_64 Richard Weinberger
2011-07-21  9:18 ` [uml-devel] [PATCH 06/10] um: Set __HAVE_ARCH_GATE_AREA for i386 Richard Weinberger
2011-07-21  9:18 ` [uml-devel] [PATCH 07/10] um: Set __HAVE_ARCH_GATE_AREA for x86_64 Richard Weinberger
2011-07-22 23:01   ` Andrew Morton
2011-07-23 12:15     ` [uml-devel] " Richard Weinberger
2011-07-21  9:18 ` [PATCH 08/10] um: Implement a x86_64 vDSO Richard Weinberger
2011-07-21  9:18 ` [uml-devel] [PATCH 09/10] um: Ajdust size of pid_buf Richard Weinberger
2011-07-21  9:38   ` Geert Uytterhoeven
2011-07-21  9:48     ` Richard Weinberger
2011-07-21  9:18 ` [uml-devel] [PATCH 10/10] um: Remove dead code Richard Weinberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox