OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "update_engine/filesystem_copier_action.h" | 5 #include "update_engine/filesystem_copier_action.h" |
6 #include <sys/stat.h> | 6 #include <sys/stat.h> |
7 #include <sys/types.h> | 7 #include <sys/types.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> |
11 #include <algorithm> | 11 #include <algorithm> |
| 12 #include <map> |
12 #include <string> | 13 #include <string> |
13 #include <vector> | 14 #include <vector> |
14 #include "update_engine/filesystem_iterator.h" | 15 #include "update_engine/filesystem_iterator.h" |
15 #include "update_engine/subprocess.h" | 16 #include "update_engine/subprocess.h" |
16 #include "update_engine/utils.h" | 17 #include "update_engine/utils.h" |
17 | 18 |
| 19 using std::map; |
18 using std::min; | 20 using std::min; |
19 using std::string; | 21 using std::string; |
20 using std::vector; | 22 using std::vector; |
21 | 23 |
22 namespace chromeos_update_engine { | 24 namespace chromeos_update_engine { |
23 | 25 |
24 namespace { | 26 namespace { |
25 const char* kMountpointTemplate = "/tmp/au_dest_mnt.XXXXXX"; | 27 const char* kMountpointTemplate = "/tmp/au_dest_mnt.XXXXXX"; |
26 const off_t kCopyFileBufferSize = 4 * 1024 * 1024; | 28 const off_t kCopyFileBufferSize = 4 * 1024 * 1024; |
27 const char* kCopyExclusionPrefix = "/lost+found"; | 29 const char* kCopyExclusionPrefix = "/lost+found"; |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 } | 298 } |
297 TEST_AND_RETURN_FALSE(!iter.IsErr()); | 299 TEST_AND_RETURN_FALSE(!iter.IsErr()); |
298 // Success! | 300 // Success! |
299 return true; | 301 return true; |
300 } | 302 } |
301 | 303 |
302 const char* FilesystemCopierAction::kCompleteFilesystemMarker( | 304 const char* FilesystemCopierAction::kCompleteFilesystemMarker( |
303 "/update_engine_copy_success"); | 305 "/update_engine_copy_success"); |
304 | 306 |
305 } // namespace chromeos_update_engine | 307 } // namespace chromeos_update_engine |
OLD | NEW |