From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: xfs <linux-xfs@vger.kernel.org>
Subject: [PATCH] xfs_db: reset metadump output flag
Date: Sat, 5 Aug 2017 09:10:13 -0700 [thread overview]
Message-ID: <20170805161013.GJ24087@magnolia> (raw)
On the off chance that someone runs metadump more than once with the
metadump file going to stdout and then not stdout, the stdout_metadump
variable will not be reset before the second invocation. Clear the
status variable when we undo the stdout redirection.
Fixes-coverity-id: 1416140
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
db/metadump.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/db/metadump.c b/db/metadump.c
index b242548..c179480 100644
--- a/db/metadump.c
+++ b/db/metadump.c
@@ -3058,6 +3058,7 @@ metadump_f(
ret = dup2(outfd, STDOUT_FILENO);
if (ret < 0)
perror("un-redirecting stdout");
+ stdout_metadump = false;
}
fclose(outf);
next reply other threads:[~2017-08-05 16:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-05 16:10 Darrick J. Wong [this message]
2017-08-11 11:24 ` [PATCH] xfs_db: reset metadump output flag Christoph Hellwig
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=20170805161013.GJ24087@magnolia \
--to=darrick.wong@oracle.com \
--cc=linux-xfs@vger.kernel.org \
--cc=sandeen@redhat.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