From: vincentfu@gmail.com
To: axboe@kernel.dk, fio@vger.kernel.org
Cc: Vincent Fu <vincent.fu@wdc.com>
Subject: [PATCH 5/5] stat: remove terse v2 blank lines with description not set
Date: Wed, 15 May 2019 16:05:03 -0400 [thread overview]
Message-ID: <20190515200503.23000-6-vincentfu@gmail.com> (raw)
In-Reply-To: <20190515200503.23000-1-vincentfu@gmail.com>
From: Vincent Fu <vincent.fu@wdc.com>
The documentation says that the job description will appear on a second
line if this is set. If it is not set there will be an empty line.
Eliminate the empty line when the description is not set.
---
stat.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/stat.c b/stat.c
index 2bc21dad..bf87917c 100644
--- a/stat.c
+++ b/stat.c
@@ -1244,12 +1244,13 @@ static void show_thread_status_terse_all(struct thread_stat *ts,
/* Additional output if continue_on_error set - default off*/
if (ts->continue_on_error)
log_buf(out, ";%llu;%d", (unsigned long long) ts->total_err_count, ts->first_error);
- if (ver == 2)
- log_buf(out, "\n");
/* Additional output if description is set */
- if (strlen(ts->description))
+ if (strlen(ts->description)) {
+ if (ver == 2)
+ log_buf(out, "\n");
log_buf(out, ";%s", ts->description);
+ }
log_buf(out, "\n");
}
--
2.17.1
next prev parent reply other threads:[~2019-05-15 20:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-15 20:04 [PATCH 0/5] terse client/server output vincentfu
2019-05-15 20:04 ` [PATCH 1/5] client: do not print disk utilization for terse v2 vincentfu
2019-05-15 20:05 ` [PATCH 2/5] client: handle disk util for all output formats vincentfu
2019-05-15 20:05 ` [PATCH 3/5] client: add a newline after terse disk util vincentfu
2019-05-15 20:05 ` [PATCH 4/5] docs: improve terse output format documentation vincentfu
2019-05-15 20:05 ` vincentfu [this message]
2019-05-16 14:43 ` [PATCH 0/5] terse client/server output Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190515200503.23000-6-vincentfu@gmail.com \
--to=vincentfu@gmail.com \
--cc=axboe@kernel.dk \
--cc=fio@vger.kernel.org \
--cc=vincent.fu@wdc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox