Alex Deymo | 4243291 | 2013-07-12 20:21:15 -0700 | [diff] [blame] | 1 | // Copyright (c) 2013 The Chromium OS Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include "update_engine/fake_hardware.h" |
| 6 | |
| 7 | using std::string; |
| 8 | |
| 9 | namespace chromeos_update_engine { |
| 10 | |
| 11 | const string FakeHardware::KernelDeviceOfBootDevice( |
| 12 | const string& boot_device) { |
| 13 | KernelDevicesMap::iterator it = kernel_devices_.find(boot_device); |
| 14 | if (it == kernel_devices_.end()) |
| 15 | return ""; |
| 16 | return it->second; |
| 17 | } |
| 18 | |
| 19 | void FakeHardware::SetKernelDeviceOfBootDevice(const string& boot_device, |
| 20 | const string& kernel_device) { |
| 21 | kernel_devices_[boot_device] = kernel_device; |
| 22 | } |
| 23 | |
| 24 | } // namespace chromeos_update_engine |