struct drand48_data random_state;
};
-inline int test_block_read(unsigned long block)
+static inline int test_block_read(unsigned long block)
{
unsigned long index, bitnr;
return (read_bitmap[index] & (1UL << bitnr)) != 0;
}
-inline int mark_block_read(unsigned long block)
+static inline int mark_block_read(unsigned long block)
{
unsigned long index, bitnr, retval;
return retval;
}
-inline unsigned long find_next_unread_block(void)
+static inline unsigned long find_next_unread_block(void)
{
unsigned int i, bitnr;
return bitnr + BITS_PER_LONG * i;
}
-int load_progress_state(void)
+static int load_progress_state(void)
{
struct progress_state state;
unsigned long i;
return 0;
}
-void save_progress_state(void)
+static void save_progress_state(void)
{
struct progress_state state;
int ret;
printf("Saved state: %lu blocks\n", blocks_read);
}
-unsigned long utime_since(struct timeval *s)
+static unsigned long utime_since(struct timeval *s)
{
double sec, usec;
struct timeval now;
return usec + (sec * (double) 1000000);
}
-unsigned long time_since_now(void)
+static unsigned long time_since_now(void)
{
double sec, usec, ret;
struct timeval now;
return (unsigned long) ret;
}
-void normalize_time(struct our_time *ot, unsigned long seconds)
+static void normalize_time(struct our_time *ot, unsigned long seconds)
{
ot->hour = seconds / 3600;
seconds -= ot->hour * 3600;
ot->sec = seconds;
}
-void show_progress_state(void)
+static void show_progress_state(void)
{
unsigned long rate, now;
struct our_time comp, left;
printf("\tRead:[%lu, %lu]: %lu%% coverage\n", blocks_read, (unsigned long) dev_size, (unsigned long) (blocks_read * 100 / dev_size));
}
-void sig_handler(int sig)
+static void sig_handler(int sig)
{
show_progress_state();
}
}
-unsigned long get_next_offset(unsigned long blocks)
+static unsigned long get_next_offset(unsigned long blocks)
{
unsigned long b, retries = dev_size;
return b;
}
-void idle_drive(struct timeval *s)
+static void idle_drive(struct timeval *s)
{
unsigned long msleep, sleep_time;
double ratio;
usleep(sleep_time);
}
-void read_error_report(int fd, char *buffer, unsigned long long offset)
+static void read_error_report(int fd, char *buffer, unsigned long long offset)
{
unsigned long long bad_block = offset >> 9;
int blocks = block_size / 512;
}
}
-void do_random_reads(int fd, unsigned long blocks)
+static void do_random_reads(int fd, unsigned long blocks)
{
struct timeval s;
char *ptr, *buffer;
free(ptr);
}
-int seed_randomizer(void)
+static int seed_randomizer(void)
{
unsigned long seed;
int fd;
return 0;
}
-void device_to_state_file(void)
+static void device_to_state_file(void)
{
unsigned int i, offset;
}
}
-void init_state_file(void)
+static void init_state_file(void)
{
if (!state_file[0])
device_to_state_file();
}
}
-int get_options(int argc, char *argv[])
+static int get_options(int argc, char *argv[])
{
static struct option longoptions[] = {
{ "device", 1, NULL, 'd' },