Move KernelDeviceOfBootDevice() to utils.
The function to construct the kernel partition block device from
its corresponding boot device uses only string manipulations, and
doesn't operate on the underlying hardware. This removes the
function from HardwareInterface, in favor of utils.
BUG=None
TEST=unit tests
Change-Id: I94b2c477413c4b484045a696f0ffbc77d9853195
Reviewed-on: https://chromium-review.googlesource.com/174913
Commit-Queue: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
diff --git a/filesystem_copier_action.cc b/filesystem_copier_action.cc
index 0aeac36..9e43482 100644
--- a/filesystem_copier_action.cc
+++ b/filesystem_copier_action.cc
@@ -90,7 +90,7 @@
string source = verify_hash_ ? destination : copy_source_;
if (source.empty()) {
source = copying_kernel_install_path_ ?
- system_state_->hardware()->KernelDeviceOfBootDevice(
+ utils::KernelDeviceOfBootDevice(
system_state_->hardware()->BootDevice()) :
system_state_->hardware()->BootDevice();
}