| OLD | NEW |
| 1 // Copyright (c) 2012 The Native Client Authors. All rights reserved. | 1 // Copyright (c) 2012 The Native Client 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 | 5 |
| 6 #include "native_client/src/trusted/sel_universal/reverse_emulate.h" | 6 #include "native_client/src/trusted/sel_universal/reverse_emulate.h" |
| 7 #include <stdio.h> | 7 #include <stdio.h> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 if (!launcher.StartViaCommandLine(command_prefix, sel_ldr_argv, app_argv)) { | 224 if (!launcher.StartViaCommandLine(command_prefix, sel_ldr_argv, app_argv)) { |
| 225 NaClLog(LOG_FATAL, | 225 NaClLog(LOG_FATAL, |
| 226 "ReverseEmulate::CreateProcess: failed to launch sel_ldr\n"); | 226 "ReverseEmulate::CreateProcess: failed to launch sel_ldr\n"); |
| 227 } | 227 } |
| 228 | 228 |
| 229 if (!launcher.RetrieveSockAddr()) { | 229 if (!launcher.RetrieveSockAddr()) { |
| 230 NaClLog(LOG_ERROR, | 230 NaClLog(LOG_ERROR, |
| 231 "ReverseEmulate::CreateProcess: failed to obtain socket addr\n"); | 231 "ReverseEmulate::CreateProcess: failed to obtain socket addr\n"); |
| 232 return -NACL_ABI_EAGAIN; | 232 return -NACL_ABI_EAGAIN; |
| 233 } | 233 } |
| 234 *out_sock_addr = launcher.socket_addr(); | 234 *out_sock_addr = launcher.secure_socket_addr(); |
| 235 | 235 |
| 236 return 0; | 236 return 0; |
| 237 } | 237 } |
| 238 | 238 |
| 239 int64_t ReverseEmulate::RequestQuotaForWrite(nacl::string file_id, | 239 int64_t ReverseEmulate::RequestQuotaForWrite(nacl::string file_id, |
| 240 int64_t offset, | 240 int64_t offset, |
| 241 int64_t length) { | 241 int64_t length) { |
| 242 NaClLog(1, "ReverseEmulate::RequestQuotaForWrite (file_id=%s, offset=%" | 242 NaClLog(1, "ReverseEmulate::RequestQuotaForWrite (file_id=%s, offset=%" |
| 243 NACL_PRId64", length=%"NACL_PRId64")\n", file_id.c_str(), offset, | 243 NACL_PRId64", length=%"NACL_PRId64")\n", file_id.c_str(), offset, |
| 244 length); | 244 length); |
| 245 return length; | 245 return length; |
| 246 } | 246 } |
| OLD | NEW |