Skip to content

Commit f6e5279

Browse files
committed
Add UpdateError::RollbackProtection
Updating to epoch branch of hubtools. No code impact
1 parent fa99bc6 commit f6e5279

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ 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" }
19+
#hubtools = { git = "https://github.com/oxidecomputer/hubtools.git", branch = "epoch"}
20+
hubtools = { path = "/home/stoltz/Oxide/src/hubtools/epoch/hubtools" }
1921
slog-error-chain = { git = "https://github.com/oxidecomputer/slog-error-chain.git", branch = "main", features = ["derive"] }
2022

2123
anyhow = "1.0"

gateway-messages/src/sp_to_mgs.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,6 +1149,7 @@ pub enum UpdateError {
11491149
ImageMismatch,
11501150
SignatureNotValidated,
11511151
VersionNotSupported,
1152+
RollbackProtection,
11521153
}
11531154

11541155
impl fmt::Display for UpdateError {
@@ -1208,6 +1209,9 @@ impl fmt::Display for UpdateError {
12081209
Self::InvalidComponent => {
12091210
write!(f, "invalid component for operation")
12101211
}
1212+
Self::RollbackProtection => {
1213+
write!(f, "invalid epoch compared to active image")
1214+
}
12111215
}
12121216
}
12131217
}

0 commit comments

Comments
 (0)