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:
committed by
Ronnie Sahlberg
parent
5231923bc8
commit
2d412530c1
@@ -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 "
|
||||
|
||||
Reference in New Issue
Block a user