Commit 62d34f55 authored by Jesse Schettler's avatar Jesse Schettler Committed by Commit Bot

cros_healthd: Update sku_number in cros_healthd_probe.mojom

Update cros_healthd_probe.mojom to keep it in sync with the copy in
Chrome OS.

Bug: 1026848
Test: DeviceStatusCollectorTest.TestCrosHealthdInfo
Change-Id: I7b35f6668f0f2627976c57f7a02cc22efeddbfd5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2013467Reviewed-by: default avatarSergey Poromov <poromov@chromium.org>
Reviewed-by: default avatarJack Rosenthal <jrosenth@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Commit-Queue: Jesse Schettler <jschettler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#734226}
parent ce43cd74
...@@ -770,10 +770,10 @@ class DeviceStatusCollectorState : public StatusCollectorState { ...@@ -770,10 +770,10 @@ class DeviceStatusCollectorState : public StatusCollectorState {
} }
} }
const auto& vpd_info = probe_result->vpd_info; const auto& vpd_info = probe_result->vpd_info;
if (!vpd_info.is_null()) { if (!vpd_info.is_null() && vpd_info->sku_number.has_value()) {
em::SystemStatus* const system_status_out = em::SystemStatus* const system_status_out =
response_params_.device_status->mutable_system_status(); response_params_.device_status->mutable_system_status();
system_status_out->set_vpd_sku_number(vpd_info->sku_number); system_status_out->set_vpd_sku_number(vpd_info->sku_number.value());
} }
const auto& battery_info = probe_result->battery_info; const auto& battery_info = probe_result->battery_info;
if (!battery_info.is_null()) { if (!battery_info.is_null()) {
......
...@@ -74,8 +74,8 @@ struct NonRemovableBlockDeviceInfo { ...@@ -74,8 +74,8 @@ struct NonRemovableBlockDeviceInfo {
// Cached VPD read from sysfs. // Cached VPD read from sysfs.
struct CachedVpdInfo { struct CachedVpdInfo {
// Contents of /sys/firmware/vpd/ro/sku_number. // Contents of /sys/firmware/vpd/ro/sku_number, if the device supports it.
string sku_number; string? sku_number;
}; };
// Information related to a device's CPU. // Information related to a device's CPU.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment