| 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/kernel_proxy.h" | 5 #include "nacl_io/kernel_proxy.h" |
| 6 | 6 |
| 7 #include <assert.h> | 7 #include <assert.h> |
| 8 #include <errno.h> | 8 #include <errno.h> |
| 9 #include <fcntl.h> | 9 #include <fcntl.h> |
| 10 #include <limits.h> | 10 #include <limits.h> |
| (...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 627 | 627 |
| 628 return 0; | 628 return 0; |
| 629 } | 629 } |
| 630 | 630 |
| 631 int KernelProxy::truncate(const char* path, off_t len) { | 631 int KernelProxy::truncate(const char* path, off_t len) { |
| 632 errno = ENOSYS; | 632 errno = ENOSYS; |
| 633 return -1; | 633 return -1; |
| 634 } | 634 } |
| 635 | 635 |
| 636 int KernelProxy::lstat(const char* path, struct stat* buf) { | 636 int KernelProxy::lstat(const char* path, struct stat* buf) { |
| 637 errno = ENOSYS; | 637 return stat(path, buf); |
| 638 return -1; | |
| 639 } | 638 } |
| 640 | 639 |
| 641 int KernelProxy::rename(const char* path, const char* newpath) { | 640 int KernelProxy::rename(const char* path, const char* newpath) { |
| 642 ScopedFilesystem fs; | 641 ScopedFilesystem fs; |
| 643 Path rel; | 642 Path rel; |
| 644 Error error = AcquireFsAndRelPath(path, &fs, &rel); | 643 Error error = AcquireFsAndRelPath(path, &fs, &rel); |
| 645 if (error) { | 644 if (error) { |
| 646 errno = error; | 645 errno = error; |
| 647 return -1; | 646 return -1; |
| 648 } | 647 } |
| (...skipping 952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1601 errno = ENOTSOCK; | 1600 errno = ENOTSOCK; |
| 1602 return -1; | 1601 return -1; |
| 1603 } | 1602 } |
| 1604 | 1603 |
| 1605 return 0; | 1604 return 0; |
| 1606 } | 1605 } |
| 1607 | 1606 |
| 1608 #endif // PROVIDES_SOCKET_API | 1607 #endif // PROVIDES_SOCKET_API |
| 1609 | 1608 |
| 1610 } // namespace_nacl_io | 1609 } // namespace_nacl_io |
| OLD | NEW |