[yosys] 06/38: Added "yosys -L logfile"

Ruben Undheim rubund-guest at moszumanska.debian.org
Mon Feb 9 19:36:44 UTC 2015


This is an automated email from the git hooks/post-receive script.

rubund-guest pushed a commit to tag upstream/0.5.0
in repository yosys.

commit 8514fe79dbabb8ed95b24d29e98c16e4027dfc57
Author: Clifford Wolf <clifford at clifford.at>
Date:   Tue Feb 3 23:04:58 2015 +0100

    Added "yosys -L logfile"
---
 kernel/driver.cc | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/kernel/driver.cc b/kernel/driver.cc
index e95ef48..116df54 100644
--- a/kernel/driver.cc
+++ b/kernel/driver.cc
@@ -127,6 +127,9 @@ int main(int argc, char **argv)
 		printf("    -l logfile\n");
 		printf("        write log messages to the specified file\n");
 		printf("\n");
+		printf("    -L logfile\n");
+		printf("        like -l but open log file in line buffered mode\n");
+		printf("\n");
 		printf("    -o outfile\n");
 		printf("        write the design to the specified file on exit\n");
 		printf("\n");
@@ -183,7 +186,7 @@ int main(int argc, char **argv)
 	}
 
 	int opt;
-	while ((opt = getopt(argc, argv, "MXAQTVSm:f:Hh:b:o:p:l:qv:tds:c:")) != -1)
+	while ((opt = getopt(argc, argv, "MXAQTVSm:f:Hh:b:o:p:l:L:qv:tds:c:")) != -1)
 	{
 		switch (opt)
 		{
@@ -231,11 +234,14 @@ int main(int argc, char **argv)
 			got_output_filename = true;
 			break;
 		case 'l':
+		case 'L':
 			log_files.push_back(fopen(optarg, "wt"));
 			if (log_files.back() == NULL) {
 				fprintf(stderr, "Can't open log file `%s' for writing!\n", optarg);
 				exit(1);
 			}
+			if (opt == 'L')
+				setvbuf(log_files.back(), NULL, _IOLBF, 0);
 			break;
 		case 'q':
 			mode_q = true;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/yosys.git



More information about the debian-science-commits mailing list