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
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user