Page MenuHomeFreeBSD

D44253.diff
No OneTemporary

D44253.diff

diff --git a/sys/kern/sys_timerfd.c b/sys/kern/sys_timerfd.c
--- a/sys/kern/sys_timerfd.c
+++ b/sys/kern/sys_timerfd.c
@@ -26,6 +26,7 @@
* SUCH DAMAGE.
*/
+#include <sys/_clock_id.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/callout.h>
@@ -432,8 +433,18 @@
AUDIT_ARG_VALUE(clockid);
AUDIT_ARG_FFLAGS(flags);
- if (clockid != CLOCK_REALTIME && clockid != CLOCK_MONOTONIC)
+ switch (clockid) {
+ case CLOCK_REALTIME:
+ /* FALLTHROUGH */
+ case CLOCK_MONOTONIC:
+ /* FALLTHROUGH */
+ case CLOCK_UPTIME:
+ /* FALLTHROUGH */
+ case CLOCK_BOOTTIME:
+ break;
+ default:
return (EINVAL);
+ }
if ((flags & ~(TFD_CLOEXEC | TFD_NONBLOCK)) != 0)
return (EINVAL);

File Metadata

Mime Type
text/plain
Expires
Thu, May 1, 2:15 AM (2 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17870202
Default Alt Text
D44253.diff (699 B)

Event Timeline