Module Name: src
Committed By: pooka
Date: Sun Aug 16 11:05:06 UTC 2015
Modified Files:
src/lib/librumpuser: rumpuser.c
Log Message:
Fix return value inspection for clock_nanosleep() (not displayed in the
diff, need to look at the entire file for context).
from Robert Millan <[email protected]> via rumpkernel-users
To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/lib/librumpuser/rumpuser.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/librumpuser/rumpuser.c
diff -u src/lib/librumpuser/rumpuser.c:1.66 src/lib/librumpuser/rumpuser.c:1.67
--- src/lib/librumpuser/rumpuser.c:1.66 Mon Jul 27 07:31:00 2015
+++ src/lib/librumpuser/rumpuser.c Sun Aug 16 11:05:06 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: rumpuser.c,v 1.66 2015/07/27 07:31:00 pooka Exp $ */
+/* $NetBSD: rumpuser.c,v 1.67 2015/08/16 11:05:06 pooka Exp $ */
/*
* Copyright (c) 2007-2010 Antti Kantee. All Rights Reserved.
@@ -28,7 +28,7 @@
#include "rumpuser_port.h"
#if !defined(lint)
-__RCSID("$NetBSD: rumpuser.c,v 1.66 2015/07/27 07:31:00 pooka Exp $");
+__RCSID("$NetBSD: rumpuser.c,v 1.67 2015/08/16 11:05:06 pooka Exp $");
#endif /* !lint */
#include <sys/stat.h>
@@ -156,12 +156,11 @@ rumpuser_clock_sleep(int enum_rumpclock,
tsr.tv_nsec += 1000*1000*1000;
}
rv = nanosleep(&tsr, NULL);
+ if (rv == -1)
+ rv = errno;
}
#endif
- } while (rv == -1 && errno == EINTR);
- if (rv == -1) {
- rv = errno;
- }
+ } while (rv == EINTR);
break;
default:
abort();