static int force = 0; /* force check of mounted device */
static int t_flag = 0; /* number of test patterns */
static int t_max = 0; /* allocated test patterns */
-static unsigned long *t_patts = NULL; /* test patterns */
+static unsigned int *t_patts = NULL; /* test patterns */
static int current_O_DIRECT = 0; /* Current status of O_DIRECT flag */
static int exclusive_ok = 0;
}
-static void pattern_fill(unsigned char *buffer, unsigned long pattern,
+static void pattern_fill(unsigned char *buffer, unsigned int pattern,
size_t n)
{
unsigned int i, nb;
unsigned char bpattern[sizeof(pattern)], *ptr;
- if (pattern == (unsigned long) ~0) {
+ if (pattern == (unsigned int) ~0) {
for (ptr = buffer; ptr < buffer + n; ptr++) {
(*ptr) = random() % (1 << (8 * sizeof(char)));
}
unsigned long blocks_at_once)
{
unsigned char *buffer, *read_buffer;
- const unsigned long patterns[] = {0xaa, 0x55, 0xff, 0x00};
- const unsigned long *pattern;
+ const unsigned int patterns[] = {0xaa, 0x55, 0xff, 0x00};
+ const unsigned int *pattern;
int i, try, got, nr_pattern, pat_idx;
unsigned int bb_count = 0;
unsigned char *blkbuf, *save_ptr, *test_ptr, *read_ptr;
unsigned char *test_base, *save_base, *read_base;
int try, i;
- const unsigned long patterns[] = { ~0 };
- const unsigned long *pattern;
+ const unsigned int patterns[] = { ~0 };
+ const unsigned int *pattern;
int nr_pattern, pat_idx;
long got, used2, written, save_currently_testing;
struct saved_blk_record *test_record;
int passes_clean = 0;
int dev;
errcode_t errcode;
- unsigned long pattern;
+ unsigned int pattern;
unsigned int (*test_func)(int, unsigned long,
int, unsigned long,
unsigned long);
break;
case 't':
if (t_flag + 1 > t_max) {
- unsigned long *t_patts_new;
+ unsigned int *t_patts_new;
t_patts_new = realloc(t_patts, t_max + T_INC);
if (!t_patts_new) {
optarg);
exit(1);
}
- if (pattern == (unsigned long) ~0)
+ if (pattern == (unsigned int) ~0)
pattern = 0xffff;
t_patts[t_flag++] = pattern;
}
"in read-only mode"));
exit(1);
}
- if (t_patts && (t_patts[0] == (unsigned long) ~0)) {
+ if (t_patts && (t_patts[0] == (unsigned int) ~0)) {
com_err(program_name, 0,
_("Random test_pattern is not allowed "
"in read-only mode"));