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

View File

@@ -25,23 +25,6 @@
#include "iscsi-test-cu.h"
static const unsigned char zeroBlock[4096];
static int all_zeroes(const unsigned char *buf, unsigned size)
{
unsigned j, e;
for (j = 0; j < size; j += sizeof(zeroBlock)) {
e = size - j;
if (sizeof(zeroBlock) < e)
e = sizeof(zeroBlock);
if (memcmp(buf + j, zeroBlock, e) != 0)
return 0;
}
return 1;
}
void
test_writesame16_unmap(void)
{