[kitten] push by kevin.pe...@gmail.com - Forgot to add pmem_zero.c on last commit. on 2013-09-09 22:07 GMT

1 view
Skip to first unread message

kit...@googlecode.com

unread,
Sep 9, 2013, 6:08:03 PM9/9/13
to kitten-...@googlegroups.com
Revision: fdd649916151
Branch: default
Author: Kevin Pedretti <ktp...@sandia.gov>
Date: Thu Sep 5 03:49:45 2013 UTC
Log: Forgot to add pmem_zero.c on last commit.
http://code.google.com/p/kitten/source/detail?r=fdd649916151

Added:
/kernel/lwk_syscalls/pmem_zero.c

=======================================
--- /dev/null
+++ /kernel/lwk_syscalls/pmem_zero.c Thu Sep 5 03:49:45 2013 UTC
@@ -0,0 +1,18 @@
+#include <lwk/pmem.h>
+#include <arch/uaccess.h>
+
+int
+sys_pmem_zero(
+ const struct pmem_region __user * rgn
+)
+{
+ struct pmem_region _rgn;
+
+ if (current->uid != 0)
+ return -EPERM;
+
+ if (copy_from_user(&_rgn, rgn, sizeof(_rgn)))
+ return -EINVAL;
+
+ return pmem_zero(&_rgn);
+}
Reply all
Reply to author
Forward
0 new messages