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

Side by Side Diff: native_client_sdk/src/libraries/nacl_io/kernel_proxy.cc

Issue 320983002: [NaCl SDK] nacl_io: Allows subtree of html5fs to be mounted. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 std::string abs_path = GetAbsParts(target).Join(); 417 std::string abs_path = GetAbsParts(target).Join();
418 418
419 // Find a factory of that type 419 // Find a factory of that type
420 FsFactoryMap_t::iterator factory = factories_.find(filesystemtype); 420 FsFactoryMap_t::iterator factory = factories_.find(filesystemtype);
421 if (factory == factories_.end()) 421 if (factory == factories_.end())
422 return ENODEV; 422 return ENODEV;
423 423
424 // Create a map of settings 424 // Create a map of settings
425 StringMap_t smap; 425 StringMap_t smap;
426 smap["SOURCE"] = source; 426 smap["SOURCE"] = source;
427 smap["TARGET"] = abs_path;
428 427
429 if (data) { 428 if (data) {
430 std::vector<std::string> elements; 429 std::vector<std::string> elements;
431 sdk_util::SplitString(static_cast<const char*>(data), ',', &elements); 430 sdk_util::SplitString(static_cast<const char*>(data), ',', &elements);
432 431
433 for (std::vector<std::string>::const_iterator it = elements.begin(); 432 for (std::vector<std::string>::const_iterator it = elements.begin();
434 it != elements.end(); 433 it != elements.end();
435 ++it) { 434 ++it) {
436 size_t location = it->find('='); 435 size_t location = it->find('=');
437 if (location != std::string::npos) { 436 if (location != std::string::npos) {
(...skipping 1240 matching lines...) Expand 10 before | Expand all | Expand 10 after
1678 errno = ENOTSOCK; 1677 errno = ENOTSOCK;
1679 return -1; 1678 return -1;
1680 } 1679 }
1681 1680
1682 return 0; 1681 return 0;
1683 } 1682 }
1684 1683
1685 #endif // PROVIDES_SOCKET_API 1684 #endif // PROVIDES_SOCKET_API
1686 1685
1687 } // namespace_nacl_io 1686 } // namespace_nacl_io
OLDNEW
« no previous file with comments | « native_client_sdk/src/libraries/nacl_io/httpfs/http_fs.cc ('k') | native_client_sdk/src/libraries/nacl_io/node.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698