diff options
Diffstat (limited to 'host/lib/include/flashrom.h')
-rw-r--r-- | host/lib/include/flashrom.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/host/lib/include/flashrom.h b/host/lib/include/flashrom.h index 6058d644..9fae8046 100644 --- a/host/lib/include/flashrom.h +++ b/host/lib/include/flashrom.h @@ -59,3 +59,19 @@ int flashrom_write_image(const struct firmware_image *image, const char * const regions[], const struct firmware_image *diff_image, int do_verify, int verbosity); + +enum wp_state { + WP_ERROR = -1, + WP_DISABLED = 0, + WP_ENABLED, +}; + +/** + * Get wp state using flashrom. + * + * @param programmer The name of the programmer to use for reading the + * writeprotect state. + * + * @return WP_DISABLED, WP_ENABLED, ot a relevant error. + */ +enum wp_state flashrom_get_wp(const char *programmer, int verbosity); |