cli: Add new write-protect CLI
Add a new write-protect CLI that is based on the classic-CLI feature
in flashrom/master. The syntax is slighty different: With the new
CLI wrapper, we can either call it as `flashprog write-protect` or
`flashprog wp`. To keep the CLI code clean, we allow only one write-
protection operation per call.
For instance, the write-protection status can then be queried like
this:
$ flashprog wp --status -p ch341a_spi
TODO: Write a manpage once the syntax is agreed upon.
Change-Id: I32818b58c9db939719913fc63063c41a27876554
Signed-off-by: Nico Huber <nico.h@gmx.de>
diff --git a/meson.build b/meson.build
index c871ad9..eafcbfa 100644
--- a/meson.build
+++ b/meson.build
@@ -607,6 +607,7 @@
files(
'cli.c',
'cli_config.c',
+ 'cli_wp.c',
'cli_classic.c',
'cli_common.c',
'cli_output.c',