test-tool: Move all_zeroes() helper function to iscsi-support.c

This patch does not change any functionality.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
This commit is contained in:
Bart Van Assche
2015-10-02 14:32:56 -07:00
committed by Ronnie Sahlberg
parent 5231923bc8
commit 2d412530c1
8 changed files with 29 additions and 58 deletions
+1 -4
View File
@@ -219,12 +219,9 @@ check_lun_is_wiped(unsigned char *buf, uint64_t lba)
}
if (rc16->lbprz) {
unsigned char *zbuf = alloca(256 * block_size);
memset(zbuf, 0, 256 * block_size);
logging(LOG_VERBOSE, "LBPRZ==1 All blocks "
"should read back as 0");
if (memcmp(zbuf, rbuf, 256 * block_size)) {
if (all_zeroes(rbuf, 256 * block_size) == 0) {
logging(LOG_NORMAL, "[FAILED] Blocks did not "
"read back as zero");
CU_FAIL("[FAILED] Blocks did not read back "