blob: 93c3863c618a94f1b0c07fec8713b9bd112ba37f [file] [log] [blame]
alaffincc2e5552000-07-27 17:13:18 +00001#ifndef _DATABIN_H_
2#define _DATABIN_H_
3
4/*******************************************************************************
5* NAME
6* databingen - fill a buffer with a data pattern
7*
8* SYNOPSIS
9* (void) databingen(mode, buffer, bsize, offset)
10* int mode;
11* char *buffer;
12* int bsize;
13* int offset;
14*
15* DESCRIPTION
16* datagen fills the buffer pointed to by 'buffer' with 'bsize' bytes
vapier45a8ba02009-07-20 10:59:32 +000017* of data of the form indicated by 'mode'.
alaffincc2e5552000-07-27 17:13:18 +000018* All modes (expect r -random) are file offset based.
19* This allows more than process to do writing to the file without
20* corrupting it if the same modes were used.
21* They data modes to choose from, these are:
22*
23* 'a' - writes an alternating bit pattern (i.e. 0x5555555...)
24*
25* 'c' - writes a checkerboard pattern (i.e. 0xff00ff00ff00...)
26*
27* 'C' - writes counting pattern (i.e. 0 - 07, 0 - 07, ...);
28*
29* 'o' - writes all bits set (i.e. 0xffffffffffffff...)
30*
31* 'z' - writes all bits cleared (i.e. 0x000000000...);
32*
33* 'r' - writes random integers
34*
35* RETURN VALUE
36* None
37*
38*******************************************************************************/
39
subrata_modakb15aafd2008-10-20 06:30:32 +000040void databingen( int mode, char *buffer, int bsize, int offset );
alaffincc2e5552000-07-27 17:13:18 +000041
Alex Elder86d0dba2011-04-01 17:01:23 -050042int databinchk( int mode, char *buffer, int bsize, int offset, char **errmsg);
alaffincc2e5552000-07-27 17:13:18 +000043
44#endif