]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test_librbd_fsx: move prterrcode() and simple_err()
authorIlya Dryomov <ilya.dryomov@inktank.com>
Fri, 25 Apr 2014 09:36:53 +0000 (13:36 +0400)
committerIlya Dryomov <ilya.dryomov@inktank.com>
Wed, 7 May 2014 13:30:05 +0000 (17:30 +0400)
Move prterrcode() and simple_err() so that all printing functions are
close together.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
src/test/librbd/fsx.c

index 166bf573baaafdc7ab9e6287b937edc0486fcbc7..2b65da5810b0117e8746babe439cc8ede8da92e4 100644 (file)
@@ -222,6 +222,18 @@ prterr(char *prefix)
        prt("%s%s%s\n", prefix, prefix ? ": " : "", strerror(errno));
 }
 
+void
+prterrcode(char *prefix, int code)
+{
+       prt("%s%s%s\n", prefix, prefix ? ": " : "", strerror(-code));
+}
+
+void
+simple_err(const char *msg, int err)
+{
+    fprintf(stderr, "%s: %s\n", msg, strerror(-err));
+}
+
 void
 log4(int operation, int arg0, int arg1, int arg2)
 {
@@ -240,12 +252,6 @@ log4(int operation, int arg0, int arg1, int arg2)
                logptr = 0;
 }
 
-void
-simple_err(const char *msg, int err)
-{
-    fprintf(stderr, "%s: %s\n", msg, strerror(-err));
-}
-
 void
 logdump(void)
 {
@@ -354,12 +360,6 @@ logdump(void)
        }
 }
 
-void
-prterrcode(char *prefix, int code)
-{
-       prt("%s%s%s\n", prefix, prefix ? ": " : "", strerror(-code));
-}
-
 void
 save_buffer(char *buffer, off_t bufferlength, int fd)
 {