Chromium Code Reviews| 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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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; | |
|
binji
2014/06/09 20:54:29
why?
Sam Clegg
2014/06/10 17:20:58
Its not uses, and shouldn't be. The filesystem sh
| |
| 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 Loading... | |
| 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 |
| OLD | NEW |