cluster: STABLE3 - fence_tool: dump only the size of the buffer
David Teigland
teigland@fedoraproject.org
Mon Mar 9 22:01:00 GMT 2009
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=c532b00466cb076b803623245d2825dcbb3ea58c
Commit: c532b00466cb076b803623245d2825dcbb3ea58c
Parent: f2c67b07b3ef399c276adf1b9bf7c2b81769bc61
Author: David Teigland <teigland@redhat.com>
AuthorDate: Mon Mar 9 16:51:21 2009 -0500
Committer: David Teigland <teigland@redhat.com>
CommitterDate: Mon Mar 9 16:57:23 2009 -0500
fence_tool: dump only the size of the buffer
Avoid printing a bunch of \0's from unfilled buffers.
Signed-off-by: David Teigland <teigland@redhat.com>
---
fence/fence_tool/fence_tool.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fence/fence_tool/fence_tool.c b/fence/fence_tool/fence_tool.c
index ce96359..6e37444 100644
--- a/fence/fence_tool/fence_tool.c
+++ b/fence/fence_tool/fence_tool.c
@@ -406,7 +406,7 @@ static void do_dump(void)
if (rv < 0)
die("can't communicate with fenced");
- do_write(STDOUT_FILENO, buf, sizeof(buf));
+ do_write(STDOUT_FILENO, buf, strlen(buf));
exit(EXIT_SUCCESS);
}
More information about the Cluster-cvs
mailing list