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/NullDevice.h" | |
Evgeniy Stepanov
2012/05/11 08:16:37
RandomDevice.h
vissi
2012/05/11 08:31:05
Done.
| |
8 | |
9 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.
| |
10 int nread; | |
11 get_random_bytes_(buf, count, &nread); | |
12 return nread; | |
13 } | |
14 int Write(off_t offset, const void *buf, size_t count) { | |
15 return EPERM; | |
16 } | |
17 | |
OLD | NEW |