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

Side by Side Diff: src/platform/update_engine/filesystem_copier_action.cc

Issue 2044001: AU: Minor fixes to get it to do full update on real device (Closed) Base URL: ssh://git@chromiumos-git/chromeos
Patch Set: fixes for review Created 10 years, 7 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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>
(...skipping 25 matching lines...) Expand all
36 ScopedActionCompleter abort_action_completer(processor_, this); 36 ScopedActionCompleter abort_action_completer(processor_, this);
37 37
38 if (!HasInputObject()) { 38 if (!HasInputObject()) {
39 LOG(ERROR) << "FilesystemCopierAction missing input object."; 39 LOG(ERROR) << "FilesystemCopierAction missing input object.";
40 return; 40 return;
41 } 41 }
42 install_plan_ = GetInputObject(); 42 install_plan_ = GetInputObject();
43 43
44 if (install_plan_.is_full_update) { 44 if (install_plan_.is_full_update) {
45 // No copy needed. Done! 45 // No copy needed. Done!
46 if (HasOutputPipe())
47 SetOutputObject(install_plan_);
46 abort_action_completer.set_success(true); 48 abort_action_completer.set_success(true);
47 return; 49 return;
48 } 50 }
49 51
50 string source = copy_source_; 52 string source = copy_source_;
51 if (source.empty()) { 53 if (source.empty()) {
52 source = copying_kernel_install_path_ ? 54 source = copying_kernel_install_path_ ?
53 utils::BootKernelDevice(utils::BootDevice()) : 55 utils::BootKernelDevice(utils::BootDevice()) :
54 utils::BootDevice(); 56 utils::BootDevice();
55 } 57 }
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 src_stream_, 170 src_stream_,
169 &buffer_[0], 171 &buffer_[0],
170 buffer_.size(), 172 buffer_.size(),
171 G_PRIORITY_DEFAULT, 173 G_PRIORITY_DEFAULT,
172 canceller_, 174 canceller_,
173 &FilesystemCopierAction::StaticAsyncReadyCallback, 175 &FilesystemCopierAction::StaticAsyncReadyCallback,
174 this); 176 this);
175 } 177 }
176 178
177 } // namespace chromeos_update_engine 179 } // namespace chromeos_update_engine
OLDNEW
« no previous file with comments | « src/platform/update_engine/action.h ('k') | src/platform/update_engine/filesystem_copier_action_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698