Index: libraries/nacl-mounts/dev/RandomDevice.cc |
=================================================================== |
--- libraries/nacl-mounts/dev/RandomDevice.cc (revision 0) |
+++ libraries/nacl-mounts/dev/RandomDevice.cc (revision 0) |
@@ -0,0 +1,17 @@ |
+/* |
+ * Copyright (c) 2012 The Native Client Authors. All rights reserved. |
+ * Use of this source code is governed by a BSD-style license that can be |
+ * found in the LICENSE file. |
+ */ |
+ |
+#include "../dev/NullDevice.h" |
Evgeniy Stepanov
2012/05/11 08:16:37
RandomDevice.h
vissi
2012/05/11 08:31:05
Done.
|
+ |
+int NullDevice::Read(off_t offset, void *buf, size_t count) { |
Evgeniy Stepanov
2012/05/11 08:16:37
RandomDevice
vissi
2012/05/11 08:31:05
Done.
|
+ int nread; |
+ get_random_bytes_(buf, count, &nread); |
+ return nread; |
+} |
+int Write(off_t offset, const void *buf, size_t count) { |
+ return EPERM; |
+} |
+ |