[<prev] [next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0703101822570.3613@alien.or.mcafeemobile.com>
Date: Sat, 10 Mar 2007 18:23:02 -0800 (PST)
From: Davide Libenzi <davidel@...ilserver.org>
To: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
cc: Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: [patch 9/9] signalfd/timerfd - timerfd compat code ...
This patch implement the necessary compat code for the timerfd system call.
Signed-off-by: Davide Libenzi <davidel@...ilserver.org>
- Davide
Index: linux-2.6.20.ep2/fs/compat.c
===================================================================
--- linux-2.6.20.ep2.orig/fs/compat.c 2007-03-10 15:58:03.000000000 -0800
+++ linux-2.6.20.ep2/fs/compat.c 2007-03-10 15:58:12.000000000 -0800
@@ -2257,3 +2257,23 @@
return sys_signalfd(ufd, ksigmask, sizeof(sigset_t));
}
+
+asmlinkage long compat_sys_timerfd(int ufd, int clockid, int tmrtype,
+ const struct compat_timespec __user *utmr)
+{
+ long res;
+ struct timespec t;
+ struct timespec __user *ut;
+
+ res = -EFAULT;
+ if (get_compat_timespec(&t, utmr))
+ goto err_exit;
+ ut = compat_alloc_user_space(sizeof(*ut));
+ if (copy_to_user(ut, &t, sizeof(t)) )
+ goto err_exit;
+
+ res = sys_timerfd(ufd, clockid, tmrtype, ut);
+err_exit:
+ return res;
+}
+
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists