2004-11-04 02:02:28

by Blaisorblade

[permalink] [raw]
Subject: [patch 18/20] uml: clear errno in CATCH_EINTR


To avoid silly messages coming out during debugging or when things break,
after that we've read in CATCH_EINTR that errno == EINTR, clear it, so that
it's 0 in next iteration.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <[email protected]>
---

vanilla-linux-2.6.9-paolo/arch/um/include/user_util.h | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN arch/um/include/user_util.h~uml-clear-errno-in-CATCH_EINTR arch/um/include/user_util.h
--- vanilla-linux-2.6.9/arch/um/include/user_util.h~uml-clear-errno-in-CATCH_EINTR 2004-11-03 23:30:34.178063672 +0100
+++ vanilla-linux-2.6.9-paolo/arch/um/include/user_util.h 2004-11-03 23:30:34.181063216 +0100
@@ -8,7 +8,7 @@

#include "sysdep/ptrace.h"

-#define CATCH_EINTR(expr) while (((expr) < 0) && (errno == EINTR))
+#define CATCH_EINTR(expr) while ((errno = 0, ((expr) < 0)) && (errno == EINTR))

extern int mode_tt;

_