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/utils.h b/utils.h
index 30c2ccd..318333e 100644
--- a/utils.h
+++ b/utils.h
@@ -70,6 +70,11 @@
 // custom chrome os ec.
 std::string GetECVersion();
 
+// Given the name of the block device of a boot partition, return the
+// name of the associated kernel partition (e.g. given "/dev/sda3",
+// return "/dev/sda2").
+const std::string KernelDeviceOfBootDevice(const std::string& boot_device);
+
 // Writes the data passed to path. The file at path will be overwritten if it
 // exists. Returns true on success, false otherwise.
 bool WriteFile(const char* path, const char* data, int data_len);