Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(799)

Side by Side Diff: services/files/file_impl.cc

Issue 1055403002: Add an Ioctl() message to the File interface. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « services/files/file_impl.h ('k') | services/files/file_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « services/files/file_impl.h ('k') | services/files/file_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698