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 "base/linux_util.h" | 5 #include "base/linux_util.h" |
6 | 6 |
7 #include <dirent.h> | 7 #include <dirent.h> |
8 #include <errno.h> | 8 #include <errno.h> |
9 #include <fcntl.h> | 9 #include <fcntl.h> |
10 #include <stdlib.h> | 10 #include <stdlib.h> |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 } | 117 } |
118 | 118 |
119 *inode_out = inode_ul; | 119 *inode_out = inode_ul; |
120 return true; | 120 return true; |
121 } | 121 } |
122 | 122 |
123 } // namespace | 123 } // namespace |
124 | 124 |
125 namespace base { | 125 namespace base { |
126 | 126 |
127 const char kFindInodeSwitch[] = "--find-inode"; | |
128 | |
129 // Account for the terminating null character. | 127 // Account for the terminating null character. |
130 static const int kDistroSize = 128 + 1; | 128 static const int kDistroSize = 128 + 1; |
131 | 129 |
132 // We use this static string to hold the Linux distro info. If we | 130 // We use this static string to hold the Linux distro info. If we |
133 // crash, the crash handler code will send this in the crash dump. | 131 // crash, the crash handler code will send this in the crash dump. |
134 char g_linux_distro[kDistroSize] = | 132 char g_linux_distro[kDistroSize] = |
135 #if defined(OS_CHROMEOS) | 133 #if defined(OS_CHROMEOS) |
136 "CrOS"; | 134 "CrOS"; |
137 #elif defined(OS_ANDROID) | 135 #elif defined(OS_ANDROID) |
138 "Android"; | 136 "Android"; |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 | 292 |
295 if (0 == strncmp(expected_data.c_str(), syscall_data.get(), | 293 if (0 == strncmp(expected_data.c_str(), syscall_data.get(), |
296 expected_data.length())) { | 294 expected_data.length())) { |
297 return current_tid; | 295 return current_tid; |
298 } | 296 } |
299 } | 297 } |
300 return -1; | 298 return -1; |
301 } | 299 } |
302 | 300 |
303 } // namespace base | 301 } // namespace base |
OLD | NEW |