From f5651604a7783c5d3cb92ac0939c5d6932c49591 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 5 Dec 2006 15:43:21 +0100 Subject: [PATCH] [PATCH] Functions static Signed-off-by: Jens Axboe --- drivescan.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/drivescan.c b/drivescan.c index dd6d261..e68eba6 100644 --- a/drivescan.c +++ b/drivescan.c @@ -81,7 +81,7 @@ struct progress_state { 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; @@ -90,7 +90,7 @@ inline int test_block_read(unsigned long block) 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; @@ -102,7 +102,7 @@ inline int mark_block_read(unsigned long block) return retval; } -inline unsigned long find_next_unread_block(void) +static inline unsigned long find_next_unread_block(void) { unsigned int i, bitnr; @@ -121,7 +121,7 @@ gotit: return bitnr + BITS_PER_LONG * i; } -int load_progress_state(void) +static int load_progress_state(void) { struct progress_state state; unsigned long i; @@ -186,7 +186,7 @@ int load_progress_state(void) return 0; } -void save_progress_state(void) +static void save_progress_state(void) { struct progress_state state; int ret; @@ -225,7 +225,7 @@ void save_progress_state(void) 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; @@ -240,7 +240,7 @@ unsigned long utime_since(struct timeval *s) 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; @@ -259,7 +259,7 @@ unsigned long time_since_now(void) 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; @@ -268,7 +268,7 @@ void normalize_time(struct our_time *ot, unsigned long seconds) ot->sec = seconds; } -void show_progress_state(void) +static void show_progress_state(void) { unsigned long rate, now; struct our_time comp, left; @@ -291,7 +291,7 @@ void show_progress_state(void) 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(); @@ -307,7 +307,7 @@ void sig_handler(int sig) } } -unsigned long get_next_offset(unsigned long blocks) +static unsigned long get_next_offset(unsigned long blocks) { unsigned long b, retries = dev_size; @@ -338,7 +338,7 @@ seq: return b; } -void idle_drive(struct timeval *s) +static void idle_drive(struct timeval *s) { unsigned long msleep, sleep_time; double ratio; @@ -352,7 +352,7 @@ void idle_drive(struct timeval *s) 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; @@ -381,7 +381,7 @@ void read_error_report(int fd, char *buffer, unsigned long long offset) } } -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; @@ -440,7 +440,7 @@ void do_random_reads(int fd, unsigned long blocks) free(ptr); } -int seed_randomizer(void) +static int seed_randomizer(void) { unsigned long seed; int fd; @@ -463,7 +463,7 @@ int seed_randomizer(void) return 0; } -void device_to_state_file(void) +static void device_to_state_file(void) { unsigned int i, offset; @@ -477,7 +477,7 @@ void device_to_state_file(void) } } -void init_state_file(void) +static void init_state_file(void) { if (!state_file[0]) device_to_state_file(); @@ -490,7 +490,7 @@ void init_state_file(void) } } -int get_options(int argc, char *argv[]) +static int get_options(int argc, char *argv[]) { static struct option longoptions[] = { { "device", 1, NULL, 'd' }, -- 2.25.1