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

Unified Diff: main.cc

Issue 6881037: AU: Always run setgoodkernel, unless we abort within 45 seconds of launch. (Closed) Base URL: http://git.chromium.org/git/update_engine.git@master
Patch Set: Created 9 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | update_attempter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: main.cc
diff --git a/main.cc b/main.cc
index 48ea9f17e3405002245e0832f0a88bcc616f62a2..769850ca6f62d0d5ddf5936c0d2794391a9ff7bc 100755
--- a/main.cc
+++ b/main.cc
@@ -41,21 +41,7 @@ namespace chromeos_update_engine {
gboolean UpdateBootFlags(void* arg) {
UpdateAttempter* attempter = reinterpret_cast<UpdateAttempter*>(arg);
- if (attempter->status() == UPDATE_STATUS_UPDATED_NEED_REBOOT) {
- // Don't update the flags if there's an update that's just been applied and
- // we're waiting for reboot because we may end up reverting the update.
- return FALSE; // Don't call this callback again.
- }
- if (attempter->status() != UPDATE_STATUS_IDLE) {
- // To avoid races (e.g., setting a good kernel right after post-install but
- // before the status changes), update the boot flag only if the attempter is
- // idle.
- return TRUE; // Call this callback again.
- }
- // This is purely best effort. Failures should be logged by Subprocess.
- int unused = 0;
- vector<string> cmd(1, "/usr/sbin/chromeos-setgoodkernel");
- Subprocess::SynchronousExec(cmd, &unused);
+ attempter->UpdateBootFlags();
return FALSE; // Don't call this callback again
}
« no previous file with comments | « no previous file | update_attempter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698