| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "nacl_io/nacl_io.h" | 5 #include "nacl_io/nacl_io.h" |
| 6 | 6 |
| 7 #include <stdlib.h> | 7 #include <stdlib.h> |
| 8 #include "nacl_io/kernel_intercept.h" | 8 #include "nacl_io/kernel_intercept.h" |
| 9 #include "nacl_io/kernel_proxy.h" | 9 #include "nacl_io/kernel_proxy.h" |
| 10 | 10 |
| 11 void nacl_io_init() { | 11 void nacl_io_init() { |
| 12 ki_init(NULL); | 12 ki_init(NULL); |
| 13 } | 13 } |
| 14 | 14 |
| 15 void nacl_io_init_ppapi(PP_Instance instance, | 15 void nacl_io_init_ppapi(PP_Instance instance, PPB_GetInterface get_interface) { |
| 16 PPB_GetInterface get_interface) { | |
| 17 ki_init_ppapi(NULL, instance, get_interface); | 16 ki_init_ppapi(NULL, instance, get_interface); |
| 18 } | 17 } |
| 19 | 18 |
| 20 | |
| 21 int nacl_io_register_fs_type(const char* fs_type, fuse_operations* fuse_ops) { | 19 int nacl_io_register_fs_type(const char* fs_type, fuse_operations* fuse_ops) { |
| 22 return ki_get_proxy()->RegisterFsType(fs_type, fuse_ops); | 20 return ki_get_proxy()->RegisterFsType(fs_type, fuse_ops); |
| 23 } | 21 } |
| 24 | 22 |
| 25 int nacl_io_unregister_fs_type(const char* fs_type) { | 23 int nacl_io_unregister_fs_type(const char* fs_type) { |
| 26 return ki_get_proxy()->UnregisterFsType(fs_type); | 24 return ki_get_proxy()->UnregisterFsType(fs_type); |
| 27 } | 25 } |
| 28 | 26 |
| 29 int nacl_io_register_exit_handler(nacl_io_exit_handler_t exit_handler, | 27 int nacl_io_register_exit_handler(nacl_io_exit_handler_t exit_handler, |
| 30 void* user_data) { | 28 void* user_data) { |
| 31 return ki_get_proxy()->RegisterExitHandler(exit_handler, user_data); | 29 return ki_get_proxy()->RegisterExitHandler(exit_handler, user_data); |
| 32 } | 30 } |
| OLD | NEW |