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" | |
8 | |
9 int NullDevice::Read(off_t offset, void *buf, size_t count) { | |
10 if (count < 0) | |
11 return -1; | |
12 memset(buf, 0, count); | |
13 return count; | |
14 } | |
15 int Write(off_t offset, const void *buf, size_t count, size_t *nwrote) { | |
16 return count; | |
17 } | |
18 | |
OLD | NEW |