Source-Changes-HG archive

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

[src/trunk]: src/etc/rc.d I should know better! Don't rely upon the way the...



details:   https://anonhg.NetBSD.org/src/rev/8ddbd33b6117
branches:  trunk
changeset: 451261:8ddbd33b6117
user:      kre <kre%NetBSD.org@localhost>
date:      Sun May 12 11:55:47 2019 +0000

description:
I should know better!   Don't rely upon the way the shell implements
pipes.   Skip the "error" printf from GetSmtId() as there is no easy
portable way to avoid it occurring (there are complicated ways) - but
we don't need it, there is no logical difference between "error" and ""
so just use the latter (if we get an ID, good, if there is nothing, then
there is none - saying 'error' does not mean anything.)

diffstat:

 etc/rc.d/smtoff |  5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 2d72ed8408f4 -r 8ddbd33b6117 etc/rc.d/smtoff
--- a/etc/rc.d/smtoff   Sun May 12 02:37:24 2019 +0000
+++ b/etc/rc.d/smtoff   Sun May 12 11:55:47 2019 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: smtoff,v 1.2 2019/05/12 00:24:03 kre Exp $
+# $NetBSD: smtoff,v 1.3 2019/05/12 11:55:47 kre Exp $
 #
 # Public Domain.
 #
@@ -44,7 +44,6 @@
                        ;;
                esac
        done
-       printf "error"
 }
 
 #
@@ -75,7 +74,7 @@
                smtid=$(GetSmtId "$i" 2>/dev/null)
 
                case "$smtid" in
-               error)                  # Didn't get the ID? Then maybe no SMT.
+               '')                     # Didn't get the ID? Then maybe no SMT.
                        ;;
 
                0)                      # The first thread is never disabled.



Home | Main Index | Thread Index | Old Index