summaryrefslogtreecommitdiffstats
path: root/bindings
diff options
context:
space:
mode:
authorEvan Benn <evanbenn@chromium.org>2022-11-21 12:37:55 +1100
committerEdward O'Callaghan <quasisec@chromium.org>2022-11-28 11:40:35 +0000
commit8edd60e6c2dce047cfb120eadaedbea1bed4560d (patch)
tree2163417807cd96f34695f417d459559dbcaa4d6a /bindings
parent438b4ef75af84e4f1a89a61691b3d1c23a6d014f (diff)
downloadflashrom-8edd60e6c2dce047cfb120eadaedbea1bed4560d.tar.gz
flashrom-8edd60e6c2dce047cfb120eadaedbea1bed4560d.tar.bz2
flashrom-8edd60e6c2dce047cfb120eadaedbea1bed4560d.zip
bindings: Add FLASHROM_WP_ERR_UNSUPPORTED_STATE
Add support for new write protect error. BUG=None BRANCH=None TEST=cargo test Change-Id: I2adaad6552a601147e779c85a2a51d2e39b91c28 Reviewed-on: https://review.coreboot.org/c/flashrom/+/69864 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Diffstat (limited to 'bindings')
-rw-r--r--bindings/rust/libflashrom/src/lib.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/bindings/rust/libflashrom/src/lib.rs b/bindings/rust/libflashrom/src/lib.rs
index 39e76acbe..95fde56e9 100644
--- a/bindings/rust/libflashrom/src/lib.rs
+++ b/bindings/rust/libflashrom/src/lib.rs
@@ -312,6 +312,7 @@ pub enum WPError {
WpErrRangeUnsupported,
WpErrModeUnsupported,
WpErrRangeListUnavailable,
+ WpErrUnsupportedState,
WpErrUnknown(libflashrom_sys::flashrom_wp_result),
}
@@ -341,6 +342,9 @@ impl From<libflashrom_sys::flashrom_wp_result> for WPError {
libflashrom_sys::flashrom_wp_result::FLASHROM_WP_ERR_RANGE_LIST_UNAVAILABLE => {
WPError::WpErrRangeListUnavailable
}
+ libflashrom_sys::flashrom_wp_result::FLASHROM_WP_ERR_UNSUPPORTED_STATE => {
+ WPError::WpErrUnsupportedState
+ }
_ => WPError::WpErrUnknown(e), // this could also be a panic
}
}