I often find myself needing to verify a disk (a la Solaris's
format->analyze->verify), essentially confirming that the disk can write/read
each sector.
Here's a small patch to allow a "verify" sequence.
diff --git a/src/pattern.c b/src/pattern.c
index 9cc258c..f955a73 100644
--- a/src/pattern.c
+++ b/src/pattern.c
@@ -84,6 +84,12 @@ static const sequence_t nnsa_seq = {
},
};
+static const sequence_t verify_seq = {
+ "verify", "Verify Sequence", 1, {
+ { PAT_VERIFY, 1, {0x00} },
+ },
+};
+
static const sequence_t dod_seq = {
"dod", "DoD 5220.22-M", 3, {
{ PAT_RANDOM, 0, {0x00} },
@@ -248,6 +254,7 @@ static const sequence_t custom_seq = {
static const sequence_t *sequences[] = {
&nnsa_seq,
+ &verify_seq,
&dod_seq,
&bsi_seq,
&usarmy_seq,
Of course, this could be expanded to do two passes (reversing bits, say, with
"0x00, 0xff" or "0xAA, 0x55"). But I wanted something quick to check some
drives, and this was it.
Original issue reported on code.google.com by shkam...@gmail.com on 30 Sep 2012 at 6:23
Original issue reported on code.google.com by
shkam...@gmail.com
on 30 Sep 2012 at 6:23