Skip to content

Commit f8a3945

Browse files
committed
Address review comments
1 parent ff34068 commit f8a3945

1 file changed

Lines changed: 14 additions & 9 deletions

File tree

task/host-sp-comms/src/main.rs

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,8 +1029,9 @@ impl ServerImpl {
10291029

10301030
// ereport!
10311031
_ = self.ereporter.deliver_ereport(&HostBootFail {
1032-
ttl_ct: new_ct,
1033-
pan_len: n as u32,
1032+
n: new_ct,
1033+
msglen: n as u32,
1034+
reason,
10341035
});
10351036
Some(SpToHost::Ack)
10361037
}
@@ -1071,8 +1072,8 @@ impl ServerImpl {
10711072
});
10721073

10731074
_ = self.ereporter.deliver_ereport(&HostPanic {
1074-
ttl_ct: new_ct,
1075-
pan_len: n as u32,
1075+
n: new_ct,
1076+
msglen: n as u32,
10761077
});
10771078

10781079
Some(SpToHost::Ack)
@@ -2083,10 +2084,11 @@ ereports::declare_ereporter! {
20832084
#[derive(Encode)]
20842085
#[ereport(class = "host.panic", version = 0)]
20852086
struct HostPanic {
2086-
/// The total number of panics observed this boot cycle.
2087+
/// The total number of host panics observed by this invocation of
2088+
/// host-sp-comms.
20872089
///
20882090
/// This count will wrap, but is guaranteed to never be zero.
2089-
ttl_ct: u32,
2091+
n: u32,
20902092
/// The length, in bytes, of the stored panic message.
20912093
///
20922094
/// This quantity may be less than the amount received, as it is capped
@@ -2098,13 +2100,16 @@ struct HostPanic {
20982100
#[derive(Encode)]
20992101
#[ereport(class = "host.btfail", version = 0)]
21002102
struct HostBootFail {
2101-
/// The total number of panics observed this boot cycle.
2103+
/// The total number of host boot failures observed by this invocation
2104+
/// of host-sp-comms.
21022105
///
21032106
/// This count will wrap, but is guaranteed to never be zero.
2104-
ttl_ct: u32,
2107+
n: u32,
21052108
/// The length, in bytes, of the stored panic message.
21062109
///
21072110
/// This quantity may be less than the amount received, as it is capped
21082111
/// by the available storage space allocated (`MAX_HOST_FAIL_MESSAGE_LEN`).
2109-
pan_len: u32,
2112+
msglen: u32,
2113+
/// The reported reason code for the host boot failure
2114+
reason: u8,
21102115
}

0 commit comments

Comments
 (0)