Whamcloud - gitweb
LU-8191 utils: remove unused, fix non-static functions
[fs/lustre-release.git] / lustre / utils / llverdev.c
index 9b6c1b6..2e9158f 100644 (file)
@@ -128,7 +128,7 @@ static struct option const long_opts[] = {
  * Usage: displays help information, whenever user supply --help option in
  * command or enters incorrect command line.
  */
-void usage(int status)
+static void usage(int status)
 {
        if (status != 0) {
                printf("\nUsage: %s [OPTION]... <device-name> ...\n",
@@ -222,9 +222,11 @@ out:
  * Verify_chunk: Verifies test pattern in each 4kB (BLOCKSIZE) is correct.
  * Returns 0 if test offset and timestamp is correct otherwise 1.
  */
-int verify_chunk(char *chunk_buf, const size_t chunksize,
-                unsigned long long chunk_off, const unsigned long long time_st,
-                const unsigned long long inode_st, const char *file)
+static int verify_chunk(char *chunk_buf, const size_t chunksize,
+                       unsigned long long chunk_off,
+                       const unsigned long long time_st,
+                       const unsigned long long inode_st,
+                       const char *file)
 {
        struct block_data *bd;
        char *chunk_end;
@@ -252,8 +254,8 @@ int verify_chunk(char *chunk_buf, const size_t chunksize,
  * and offset. The test pattern is filled at the beginning of
  * each 4kB(BLOCKSIZE) blocks in chunk_buf.
  */
-void fill_chunk(char *chunk_buf, size_t chunksize, loff_t chunk_off,
-               const time_t time_st, const ino_t inode_st)
+static void fill_chunk(char *chunk_buf, size_t chunksize, loff_t chunk_off,
+                      const time_t time_st, const ino_t inode_st)
 {
        struct block_data *bd;
        char *chunk_end;
@@ -268,7 +270,8 @@ void fill_chunk(char *chunk_buf, size_t chunksize, loff_t chunk_off,
        }
 }
 
-void show_rate(char *op, unsigned long long offset, unsigned long long count)
+static void show_rate(char *op, unsigned long long offset,
+                     unsigned long long count)
 {
        static unsigned long long subtot, total;
        static time_t start, last;
@@ -321,8 +324,8 @@ void show_rate(char *op, unsigned long long offset, unsigned long long count)
  *
  * Returns 0 on success, or -ve errno on failure.
  */
-size_t write_retry(int fd, const char *chunk_buf, size_t nrequested,
-                  unsigned long long offset, const char *file)
+static size_t write_retry(int fd, const char *chunk_buf, size_t nrequested,
+                         unsigned long long offset, const char *file)
 {
        long nwritten;
 
@@ -357,10 +360,10 @@ retry:
  *
  * Returns 0 on success, or -ve error number on failure.
  */
-int write_chunks(int fd, unsigned long long offset,
-                unsigned long long *write_end, char *chunk_buf,
-                size_t chunksize, const time_t time_st,
-                const ino_t inode_st, const char *file)
+static int write_chunks(int fd, unsigned long long offset,
+                       unsigned long long *write_end, char *chunk_buf,
+                       size_t chunksize, const time_t time_st,
+                       const ino_t inode_st, const char *file)
 {
        unsigned long long stride;
 
@@ -394,9 +397,10 @@ int write_chunks(int fd, unsigned long long offset,
  * read_chunk: reads the chunk_buf from the device. The number of read
  * operations are based on the parameters read_end, offset, and chunksize.
  */
-int read_chunks(int fd, unsigned long long offset, unsigned long long read_end,
-               char *chunk_buf, size_t chunksize, const time_t time_st,
-               const ino_t inode_st, const char *file)
+static int read_chunks(int fd, unsigned long long offset,
+                      unsigned long long read_end, char *chunk_buf,
+                      size_t chunksize, const time_t time_st,
+                      const ino_t inode_st, const char *file)
 {
        unsigned long long stride;
 
@@ -450,8 +454,8 @@ read_more:
        return 0;
 }
 
-int parse_size(const char *optarg, unsigned long long *size,
-              unsigned long long size_units)
+static int parse_size(const char *optarg, unsigned long long *size,
+                     unsigned long long size_units)
 {
        char *end;