Add erase sanitize
Sanitize uses the eMMC firmware to erase all blocks.
Tested:
$ cat /dev/urandom > /dev/mmcblk0
$ time busctl call xyz.openbmc_project.eStoraged.mmcblk0 \
/xyz/openbmc_project/inventory/storage/mmcblk0 \
xyz.openbmc_project.Inventory.Item.Volume Erase s \
xyz.openbmc_project.Inventory.Item.Volume.EraseMethod.VendorSanitize \
--timeout=1200
real 0m1.793s
user 0m0.021s
sys 0m0.009s
root@ytbaz20-nfd01:/# cat /dev/mmcblk0 | hexdump
0000000 0000 0000 0000 0000 0000 0000 0000 0000
*
Signed-off-by: John Edward Broadbent <jebr@google.com>
Change-Id: I31bc21c0b6d31cbba0db752d94a93eb004dbbde6
diff --git a/.clang-tidy b/.clang-tidy
index b5f7462..0c9cc0b 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -296,5 +296,5 @@
- { key: readability-identifier-naming.ParameterCase, value: camelBack }
- { key: readability-identifier-naming.NamespaceCase, value: lower_case }
- { key: readability-identifier-naming.StructCase, value: CamelCase }
- - { key: cppcoreguidelines-macro-usage.AllowedRegexp, value: ((ERASE_MIN_GEOMETRY)|(ERASE_MAX_GEOMETRY)) }
+ - { key: cppcoreguidelines-macro-usage.AllowedRegexp, value: ((ERASE_MIN_GEOMETRY)|(ERASE_MAX_GEOMETRY)|(twiddleextCsdEraseGroupDef)) }