| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "services/files/file_impl.h" | 5 #include "services/files/file_impl.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 #include <fcntl.h> | 8 #include <fcntl.h> |
| 9 #include <sys/stat.h> | 9 #include <sys/stat.h> |
| 10 #include <sys/types.h> | 10 #include <sys/types.h> |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 if (!file_fd_.is_valid()) { | 311 if (!file_fd_.is_valid()) { |
| 312 callback.Run(ERROR_CLOSED, ScopedSharedBufferHandle()); | 312 callback.Run(ERROR_CLOSED, ScopedSharedBufferHandle()); |
| 313 return; | 313 return; |
| 314 } | 314 } |
| 315 | 315 |
| 316 // TODO(vtl): FIXME soon | 316 // TODO(vtl): FIXME soon |
| 317 NOTIMPLEMENTED(); | 317 NOTIMPLEMENTED(); |
| 318 callback.Run(ERROR_UNIMPLEMENTED, ScopedSharedBufferHandle()); | 318 callback.Run(ERROR_UNIMPLEMENTED, ScopedSharedBufferHandle()); |
| 319 } | 319 } |
| 320 | 320 |
| 321 void FileImpl::Ioctl(uint32_t request, |
| 322 Array<uint32_t> in_values, |
| 323 const IoctlCallback& callback) { |
| 324 if (!file_fd_.is_valid()) { |
| 325 callback.Run(ERROR_CLOSED, Array<uint32_t>()); |
| 326 return; |
| 327 } |
| 328 |
| 329 // TODO(vtl): The "correct" error code should be one that can be translated to |
| 330 // ENOTTY! |
| 331 callback.Run(ERROR_UNAVAILABLE, Array<uint32_t>()); |
| 332 } |
| 333 |
| 321 } // namespace files | 334 } // namespace files |
| 322 } // namespace mojo | 335 } // namespace mojo |
| OLD | NEW |