Skip to content

Commit 1b69811

Browse files
committed
Add UpdateError::RollbackProtection
1 parent caf1e6a commit 1b69811

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

Cargo.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ resolver = "2"
1515

1616
[workspace.dependencies]
1717
tlvc = { git = "https://github.com/oxidecomputer/tlvc.git", branch = "main" }
18-
hubtools = { git = "https://github.com/oxidecomputer/hubtools.git", branch = "main"}
18+
hubtools = { git = "https://github.com/oxidecomputer/hubtools.git" }
1919
slog-error-chain = { git = "https://github.com/oxidecomputer/slog-error-chain.git", branch = "main", features = ["derive"] }
2020

2121
anyhow = "1.0"

gateway-messages/src/sp_to_mgs.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,6 +1170,7 @@ pub enum UpdateError {
11701170
ImageMismatch,
11711171
SignatureNotValidated,
11721172
VersionNotSupported,
1173+
RollbackProtection,
11731174
}
11741175

11751176
impl fmt::Display for UpdateError {
@@ -1229,6 +1230,9 @@ impl fmt::Display for UpdateError {
12291230
Self::InvalidComponent => {
12301231
write!(f, "invalid component for operation")
12311232
}
1233+
Self::RollbackProtection => {
1234+
write!(f, "invalid epoch compared to active image")
1235+
}
12321236
}
12331237
}
12341238
}

0 commit comments

Comments
 (0)