Merge "Remove obsolete GetKernelDevices() method."
diff --git a/UpdateEngine.conf b/UpdateEngine.conf
index e9fe2d5..8a91607 100644
--- a/UpdateEngine.conf
+++ b/UpdateEngine.conf
@@ -23,9 +23,6 @@
send_member="GetRollbackPartition"/>
<allow send_destination="org.chromium.UpdateEngine"
send_interface="org.chromium.UpdateEngineInterface"
- send_member="GetKernelDevices"/>
- <allow send_destination="org.chromium.UpdateEngine"
- send_interface="org.chromium.UpdateEngineInterface"
send_member="ResetStatus"/>
<allow send_destination="org.chromium.UpdateEngine"
send_interface="org.chromium.UpdateEngineInterface"
diff --git a/dbus_bindings/org.chromium.UpdateEngineInterface.dbus-xml b/dbus_bindings/org.chromium.UpdateEngineInterface.dbus-xml
index deacabd..bc4ec36 100644
--- a/dbus_bindings/org.chromium.UpdateEngineInterface.dbus-xml
+++ b/dbus_bindings/org.chromium.UpdateEngineInterface.dbus-xml
@@ -77,9 +77,6 @@
<method name="GetPrevVersion">
<arg type="s" name="prev_version" direction="out" />
</method>
- <method name="GetKernelDevices">
- <arg type="s" name="kernel_devices" direction="out" />
- </method>
<method name="GetRollbackPartition">
<arg type="s" name="rollback_partition_name" direction="out" />
</method>
diff --git a/dbus_service.cc b/dbus_service.cc
index 9f6a844..235b9c2 100644
--- a/dbus_service.cc
+++ b/dbus_service.cc
@@ -296,19 +296,6 @@
return true;
}
-bool UpdateEngineService::GetKernelDevices(ErrorPtr* /* error */,
- string* out_kernel_devices) {
- auto devices = system_state_->update_attempter()->GetKernelDevices();
- string info;
- for (const auto& device : devices) {
- base::StringAppendF(&info, "%d:%s\n",
- device.second ? 1 : 0, device.first.c_str());
- }
- LOG(INFO) << "Available kernel devices: " << info;
- *out_kernel_devices = info;
- return true;
-}
-
bool UpdateEngineService::GetRollbackPartition(
ErrorPtr* /* error */,
string* out_rollback_partition_name) {
diff --git a/dbus_service.h b/dbus_service.h
index 9c4f712..444ae64 100644
--- a/dbus_service.h
+++ b/dbus_service.h
@@ -129,11 +129,6 @@
bool GetPrevVersion(chromeos::ErrorPtr* error,
std::string* out_prev_version) override;
- // Returns a list of available kernel partitions and whether each of them
- // can be booted from or not.
- bool GetKernelDevices(chromeos::ErrorPtr* error,
- std::string* out_kernel_devices) override;
-
// Returns the name of kernel partition that can be rolled back into.
bool GetRollbackPartition(chromeos::ErrorPtr* error,
std::string* out_rollback_partition_name) override;
diff --git a/update_attempter.cc b/update_attempter.cc
index 76aaf39..6152992 100644
--- a/update_attempter.cc
+++ b/update_attempter.cc
@@ -804,28 +804,6 @@
return BootControlInterface::kInvalidSlot;
}
-vector<std::pair<string, bool>> UpdateAttempter::GetKernelDevices() const {
- const unsigned int num_slots = system_state_->boot_control()->GetNumSlots();
- const BootControlInterface::Slot current_slot =
- system_state_->boot_control()->GetCurrentSlot();
-
- vector<std::pair<string, bool>> info_list;
- for (BootControlInterface::Slot slot = 0; slot < num_slots; slot++) {
- bool bootable = system_state_->boot_control()->IsSlotBootable(slot);
- string device_name;
- if (!system_state_->boot_control()->GetPartitionDevice(
- kLegacyPartitionNameKernel, slot, &device_name)) {
- continue;
- }
- // Add '*' to the name of the partition we booted from.
- if (slot == current_slot)
- device_name += '*';
- info_list.emplace_back(device_name, bootable);
- }
-
- return info_list;
-}
-
void UpdateAttempter::CheckForUpdate(const string& app_version,
const string& omaha_url,
bool interactive) {
diff --git a/update_attempter.h b/update_attempter.h
index a884924..12da537 100644
--- a/update_attempter.h
+++ b/update_attempter.h
@@ -157,10 +157,6 @@
// name or empty string if none is available.
BootControlInterface::Slot GetRollbackSlot() const;
- // Returns a list of available kernel partitions along with information
- // whether it is possible to boot from it.
- std::vector<std::pair<std::string, bool>> GetKernelDevices() const;
-
// Initiates a reboot if the current state is
// UPDATED_NEED_REBOOT. Returns true on sucess, false otherwise.
bool RebootIfNeeded();
diff --git a/update_engine_client.cc b/update_engine_client.cc
index c6d4857..93c99e4 100644
--- a/update_engine_client.cc
+++ b/update_engine_client.cc
@@ -103,7 +103,6 @@
void Rollback(bool rollback);
string GetRollbackPartition();
- string GetKernelDevices();
void CheckForUpdates(const string& app_version,
const string& omaha_url,
bool interactive);
@@ -292,13 +291,6 @@
return rollback_partition;
}
-string UpdateEngineClient::GetKernelDevices() {
- string kernel_devices;
- bool ret = proxy_->GetKernelDevices(&kernel_devices, nullptr);
- CHECK(ret) << "Error while getting a list of kernel devices";
- return kernel_devices;
-}
-
void UpdateEngineClient::CheckForUpdates(const string& app_version,
const string& omaha_url,
bool interactive) {
@@ -473,8 +465,6 @@
"Listen for status updates and print them to the screen.");
DEFINE_bool(prev_version, false,
"Show the previous OS version used before the update reboot.");
- DEFINE_bool(show_kernels, false, "Show the list of kernel patritions and "
- "whether each of them is bootable or not");
// Boilerplate init commands.
base::CommandLine::Init(argc_, argv_);
@@ -638,11 +628,6 @@
ShowPrevVersion();
}
- if (FLAGS_show_kernels) {
- LOG(INFO) << "Kernel partitions:\n"
- << GetKernelDevices();
- }
-
if (FLAGS_is_reboot_needed) {
// In case of error GetIsRebootNeeded() will exit with 1.
if (GetIsRebootNeeded()) {