]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - term-utils/script.c
script: add separator to header, update tests
[thirdparty/util-linux.git] / term-utils / script.c
index afd43eb515c75f813893e2afcb2e77d0453ba990..ec9536477e7fb376a42f3f98b035b54305f052c7 100644 (file)
@@ -409,10 +409,10 @@ static int log_start(struct script_control *ctl,
                        if (ctl->ttyname)
                                x += fprintf(log->fp, "%*sTTY=\"%s\"", !!x, "", ctl->ttyname);
 
-                       fprintf(log->fp, "%*sCOLUMNS=\"%d\" LINES=\"%d\"", !!x, "",
+                       x += fprintf(log->fp, "%*sCOLUMNS=\"%d\" LINES=\"%d\"", !!x, "",
                                        ctl->ttycols, ctl->ttylines);
                } else
-                       fprintf(log->fp, _("<not executed on terminal>"));
+                       fprintf(log->fp, _("%*s<not executed on terminal>"), !!x, "");
 
                fputs("]\n", log->fp);
                break;