{ NULL, -1 }
};
-const char *bitmap_state(int state_num)
+static const char *bitmap_state(int state_num)
{
char *state = map_num(bitmap_states, state_num);
return state ? state : "Unknown";
}
-const char *human_chunksize(unsigned long bytes)
+static const char *human_chunksize(unsigned long bytes)
{
static char buf[16];
char *suffixes[] = { "B", "KB", "MB", "GB", "TB", NULL };
return num;
}
-int count_dirty_bits(char *buf, int num_bits)
+static int count_dirty_bits(char *buf, int num_bits)
{
int i, num = 0;
}
/* calculate the size of the bitmap given the array size and bitmap chunksize */
-unsigned long long bitmap_bits(unsigned long long array_size,
- unsigned long chunksize)
+static unsigned long long
+bitmap_bits(unsigned long long array_size, unsigned long chunksize)
{
return (array_size * 512 + chunksize - 1) / chunksize;
}
return (bits + bits_per_sector - 1) / bits_per_sector;
}
-bitmap_info_t *bitmap_fd_read(int fd, int brief)
+static bitmap_info_t *bitmap_fd_read(int fd, int brief)
{
/* Note: fd might be open O_DIRECT, so we must be
* careful to align reads properly
return info;
}
-int bitmap_file_open(char *filename, struct supertype **stp, int node_num)
+static int
+bitmap_file_open(char *filename, struct supertype **stp, int node_num)
{
int fd;
struct stat stb;
return fd;
}
-__u32 swapl(__u32 l)
+static __u32 swapl(__u32 l)
{
char *c = (char*)&l;
char t= c[0];