Add missing trailing \n in log_err/info()
authorTomohiro Kusumi <tkusumi@tuxera.com>
Tue, 3 Jan 2017 14:40:06 +0000 (23:40 +0900)
committerJens Axboe <axboe@fb.com>
Tue, 3 Jan 2017 17:10:58 +0000 (10:10 -0700)
Callers need trailing \n in case of fwrite(3) (if not syslog(3)).

These are the ones that seem to need trailing \n not followed
by another log function call as consequence.

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
backend.c
client.c
engines/e4defrag.c
engines/net.c
engines/rdma.c
iolog.c
server.c

index c8c6de6d69c826867f2b482bfca6ebd1c211d602..a46101ca5aebc04d51523f3e4eb61c01c907c368 100644 (file)
--- a/backend.c
+++ b/backend.c
@@ -2063,7 +2063,7 @@ static bool check_mount_writes(struct thread_data *td)
 
        return false;
 mounted:
 
        return false;
 mounted:
-       log_err("fio: %s appears mounted, and 'allow_mounted_write' isn't set. Aborting.", f->file_name);
+       log_err("fio: %s appears mounted, and 'allow_mounted_write' isn't set. Aborting.\n", f->file_name);
        return true;
 }
 
        return true;
 }
 
index 1b4d3d7efdc92f3d8b895b2409befeca13a37124..7934661cae1ec73e32491262fcdec854c48b9014 100644 (file)
--- a/client.c
+++ b/client.c
@@ -1322,7 +1322,7 @@ static int fio_client_handle_iolog(struct fio_client *client,
        log_pathname = malloc(10 + strlen((char *)pdu->name) +
                        strlen(client->hostname));
        if (!log_pathname) {
        log_pathname = malloc(10 + strlen((char *)pdu->name) +
                        strlen(client->hostname));
        if (!log_pathname) {
-               log_err("fio: memory allocation of unique pathname failed");
+               log_err("fio: memory allocation of unique pathname failed\n");
                return -1;
        }
        /* generate a unique pathname for the log file using hostname */
                return -1;
        }
        /* generate a unique pathname for the log file using hostname */
index e53636eb26e382b3e318abef48bd3b211d2695f1..1e4996f155ef5d258ae98a2a6748701c84e5413c 100644 (file)
@@ -95,7 +95,7 @@ static int fio_e4defrag_init(struct thread_data *td)
        ed->donor_fd = open(donor_name, O_CREAT|O_WRONLY, 0644);
        if (ed->donor_fd < 0) {
                td_verror(td, errno, "io_queue_init");
        ed->donor_fd = open(donor_name, O_CREAT|O_WRONLY, 0644);
        if (ed->donor_fd < 0) {
                td_verror(td, errno, "io_queue_init");
-               log_err("Can't open donor file %s err:%d", donor_name, ed->donor_fd);
+               log_err("Can't open donor file %s err:%d\n", donor_name, ed->donor_fd);
                free(ed);
                return 1;
        }
                free(ed);
                return 1;
        }
index 5f1401c6e04fb9aa9d1249750e25a4404fb8c9a9..3bdd5cd0ff3410e24abbd80b3c26cebda5c8a192 100644 (file)
@@ -1218,7 +1218,7 @@ static int fio_netio_setup_listen_inet(struct thread_data *td, short port)
                        return 1;
                }
                if (is_ipv6(o)) {
                        return 1;
                }
                if (is_ipv6(o)) {
-                       log_err("fio: IPv6 not supported for multicast network IO");
+                       log_err("fio: IPv6 not supported for multicast network IO\n");
                        close(fd);
                        return 1;
                }
                        close(fd);
                        return 1;
                }
index fbe8434406b72e37fd88cf20ca46114b0b001914..10e60dc8449b7634ee1949e051289f55a606eac6 100644 (file)
@@ -881,7 +881,7 @@ static int fio_rdmaio_connect(struct thread_data *td, struct fio_file *f)
        rd->send_buf.nr = htonl(td->o.iodepth);
 
        if (ibv_post_send(rd->qp, &rd->sq_wr, &bad_wr) != 0) {
        rd->send_buf.nr = htonl(td->o.iodepth);
 
        if (ibv_post_send(rd->qp, &rd->sq_wr, &bad_wr) != 0) {
-               log_err("fio: ibv_post_send fail: %m");
+               log_err("fio: ibv_post_send fail: %m\n");
                return 1;
        }
 
                return 1;
        }
 
@@ -932,7 +932,7 @@ static int fio_rdmaio_accept(struct thread_data *td, struct fio_file *f)
        ret = rdma_poll_wait(td, IBV_WC_RECV) < 0;
 
        if (ibv_post_send(rd->qp, &rd->sq_wr, &bad_wr) != 0) {
        ret = rdma_poll_wait(td, IBV_WC_RECV) < 0;
 
        if (ibv_post_send(rd->qp, &rd->sq_wr, &bad_wr) != 0) {
-               log_err("fio: ibv_post_send fail: %m");
+               log_err("fio: ibv_post_send fail: %m\n");
                return 1;
        }
 
                return 1;
        }
 
@@ -965,7 +965,7 @@ static int fio_rdmaio_close_file(struct thread_data *td, struct fio_file *f)
                                     || (rd->rdma_protocol ==
                                         FIO_RDMA_MEM_READ))) {
                if (ibv_post_send(rd->qp, &rd->sq_wr, &bad_wr) != 0) {
                                     || (rd->rdma_protocol ==
                                         FIO_RDMA_MEM_READ))) {
                if (ibv_post_send(rd->qp, &rd->sq_wr, &bad_wr) != 0) {
-                       log_err("fio: ibv_post_send fail: %m");
+                       log_err("fio: ibv_post_send fail: %m\n");
                        return 1;
                }
 
                        return 1;
                }
 
diff --git a/iolog.c b/iolog.c
index 93938905bebe4e7557e2d3c22abecf6cd230789c..25d8dd00ea5e0f6c0922454288ab1ce2e92faa94 100644 (file)
--- a/iolog.c
+++ b/iolog.c
@@ -422,7 +422,7 @@ static int read_iolog2(struct thread_data *td, FILE *f)
                                continue;
                        }
                } else {
                                continue;
                        }
                } else {
-                       log_err("bad iolog2: %s", p);
+                       log_err("bad iolog2: %s\n", p);
                        continue;
                }
 
                        continue;
                }
 
index b7ebd633f2f19b961b0d10ec1a040bb7aca04a15..6d5d4ea36ebaf9a774753d6d62c5c50d519c55f7 100644 (file)
--- a/server.c
+++ b/server.c
@@ -2538,7 +2538,7 @@ int fio_start_server(char *pidfile)
 
        pid = fork();
        if (pid < 0) {
 
        pid = fork();
        if (pid < 0) {
-               log_err("fio: failed server fork: %s", strerror(errno));
+               log_err("fio: failed server fork: %s\n", strerror(errno));
                free(pidfile);
                return -1;
        } else if (pid) {
                free(pidfile);
                return -1;
        } else if (pid) {