Index: libraries/nacl-mounts/dev/NullDevice.cc |
=================================================================== |
--- libraries/nacl-mounts/dev/NullDevice.cc (revision 0) |
+++ libraries/nacl-mounts/dev/NullDevice.cc (revision 0) |
@@ -0,0 +1,19 @@ |
+/* |
+ * 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" |
+#include <cstring> |
+ |
+int NullDevice::Read(off_t offset, void *buf, size_t count) { |
+ if (count < 0) |
+ return -1; |
+ return 0; |
+} |
+ |
+int NullDevice::Write(off_t offset, const void *buf, size_t count) { |
+ return count; |
+} |
+ |