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

Side by Side Diff: set_bootable_flag_action.cc

Issue 3022008: For actions, switch bool success into an exit code. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: switch to all positive error codes. Created 10 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « postinstall_runner_action_unittest.cc ('k') | test_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 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/set_bootable_flag_action.h" 5 #include "update_engine/set_bootable_flag_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 <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 command.push_back("boot"); 62 command.push_back("boot");
63 command.push_back("-i"); 63 command.push_back("-i");
64 command.push_back(partition_number); 64 command.push_back(partition_number);
65 command.push_back("-b"); 65 command.push_back("-b");
66 command.push_back(temp_file); 66 command.push_back(temp_file);
67 command.push_back(root_device); 67 command.push_back(root_device);
68 int rc = 0; 68 int rc = 0;
69 Subprocess::SynchronousExec(command, &rc); 69 Subprocess::SynchronousExec(command, &rc);
70 TEST_AND_RETURN(rc == 0); 70 TEST_AND_RETURN(rc == 0);
71 71
72 completer.set_success(true); 72 completer.set_code(kActionCodeSuccess);
73 if (HasOutputPipe()) 73 if (HasOutputPipe())
74 SetOutputObject(GetInputObject()); 74 SetOutputObject(GetInputObject());
75 } 75 }
76 76
77 } // namespace chromeos_update_engine 77 } // namespace chromeos_update_engine
OLDNEW
« no previous file with comments | « postinstall_runner_action_unittest.cc ('k') | test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698