Go to the documentation of this file.
28 static uint32_t
ran(
void)
37 fprintf(stderr,
"seek failed\n");
42 int main(
int argc,
char **argv)
48 printf(
"USAGE: trasher <filename> <count> <maxburst> <seed>\n");
52 f = fopen(argv[1],
"rb+");
57 count = atoi(argv[2]);
58 maxburst = atoi(argv[3]);
59 state = atoi(argv[4]);
66 int burst = 1 +
ran() * (uint64_t) (
abs(maxburst) - 1) / UINT32_MAX;
67 int pos =
ran() * (uint64_t)
length / UINT32_MAX;
77 int val =
ran() * 256ULL / UINT32_MAX;
82 fwrite(&
val, 1, 1,
f);
int main(int argc, char **argv)
printf("static const uint8_t my_array[100] = {\n")
const char const char void * val
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf offset
static uint32_t ran(void)
static void checked_seek(FILE *stream, int64_t offset, int whence)