AU: Add support for reading the output of synchronous exec calls.
This will be used in a subsequent patch to invoke 'crossystem hwid' to read the
HWID.
BUG=chromium-os:15255
TEST=unit tests, tested AU on device
Change-Id: Ie26bae3621626d40f92f08e8549eefda77151102
Reviewed-on: http://gerrit.chromium.org/gerrit/1047
Reviewed-by: Thieu Le <thieule@chromium.org>
Tested-by: Darin Petkov <petkov@chromium.org>
diff --git a/utils.cc b/utils.cc
index e1256a7..9c05a25 100644
--- a/utils.cc
+++ b/utils.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -60,7 +60,7 @@
// Assume dev mode if the dev switch is set to 1 and there was no error
// executing crossystem. Assume normal mode otherwise.
- bool success = Subprocess::SynchronousExec(cmd, &exit_code);
+ bool success = Subprocess::SynchronousExec(cmd, &exit_code, NULL);
bool dev_mode = success && exit_code == 0;
LOG_IF(INFO, dev_mode) << "Booted in dev mode.";
return !dev_mode;
@@ -513,7 +513,7 @@
command.push_back("-r");
command.push_back("now");
int rc = 0;
- Subprocess::SynchronousExec(command, &rc);
+ Subprocess::SynchronousExec(command, &rc, NULL);
TEST_AND_RETURN_FALSE(rc == 0);
return true;
}