[PATCH] xfs_db: reset metadump output flag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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);
 
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux