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