]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
script: always write stat and done message to typescript file
authorKarel Zak <kzak@redhat.com>
Tue, 18 Apr 2017 10:12:44 +0000 (12:12 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 18 Apr 2017 10:12:44 +0000 (12:12 +0200)
And remove usec from timestamp.

Signed-off-by: Karel Zak <kzak@redhat.com>
term-utils/script.1
term-utils/script.c

index 5c366b129240da660e9dcd57484b96fe169bc57b..ff3ef528dff35cc13b4fb844e97db352bd39a7fe 100644 (file)
@@ -83,8 +83,7 @@ Allow the default output destination, i.e. the typescript file, to be a hard
 or symbolic link.  The command will follow a symbolic link.
 .TP
 \fB\-q\fR, \fB\-\-quiet\fR
-Be quiet (do not write start and done messages to either standard output
-or the typescript file).
+Be quiet (do not write start and done messages to standard output).
 .TP
 \fB\-t\fR, \fB\-\-timing\fR[=\fIfile\fR]
 Output timing data to standard error, or to
index 19ecddc933e0530be74a7ae47d2c2785e95c5ad9..f2fc2f59c6684c7ccdd8172bba766fb3628b35d8 100644 (file)
@@ -435,8 +435,8 @@ static void do_io(struct script_control *ctl)
        }
 
 
-       if (!ctl->quiet && ctl->typescriptfp) {
-               strtime_iso(&tvec, ISO_8601_DATE | ISO_8601_TIME | ISO_8601_DOTUSEC |
+       if (ctl->typescriptfp) {
+               strtime_iso(&tvec, ISO_8601_DATE | ISO_8601_TIME |
                                ISO_8601_TIMEZONE | ISO_8601_SPACE,
                                buf, sizeof(buf));
                fprintf(ctl->typescriptfp, _("Script started on %s\n"), buf);
@@ -510,9 +510,10 @@ static void do_io(struct script_control *ctl)
 
        if (!ctl->die)
                wait_for_child(ctl, 1);
-       if (!ctl->quiet && ctl->typescriptfp) {
+
+       if (ctl->typescriptfp) {
                tvec = script_time((time_t *)NULL);
-               strtime_iso(&tvec, ISO_8601_DATE | ISO_8601_TIME | ISO_8601_DOTUSEC |
+               strtime_iso(&tvec, ISO_8601_DATE | ISO_8601_TIME |
                                ISO_8601_TIMEZONE | ISO_8601_SPACE,
                                buf, sizeof(buf));
                fprintf(ctl->typescriptfp, _("\nScript done on %s\n"), buf);