OLD | NEW |
---|---|
(Empty) | |
1 /* | |
2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. | |
3 * Use of this source code is governed by a BSD-style license that can be | |
4 * found in the LICENSE file. | |
5 */ | |
6 | |
7 #include "../dev/RandomDevice.h" | |
8 #include <errno.h> | |
9 | |
10 int RandomDevice::Read(off_t offset, void *buf, size_t count) { | |
11 size_t nread; | |
12 get_random_bytes_(buf, count, &nread); | |
13 return nread; | |
14 } | |
15 | |
16 int RandomDevice::Write(off_t offset, const void *buf, size_t count) { | |
17 return EPERM; | |
18 } | |
19 | |
OLD | NEW |