[PATCH openbmc v2 02/34] shutdown: Correct comment on the reason to invoke stty

OpenBMC Patches openbmc-patches at stwcx.xyz
Tue Mar 8 08:29:51 AEDT 2016


From: "Milton D. Miller II" <miltonm at us.ibm.com>

The desired system call is not an ioctl but tcsetattr with
second parameter TCSADRAIN.

Reported-by: Andrew Jeffery <andrew at aj.id.au>
Signed-off-by: Milton Miller <miltonm at us.ibm.com>
---
 .../common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-shutdown.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-shutdown.sh b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-shutdown.sh
index 216e7e4..097d9e0 100644
--- a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-shutdown.sh
+++ b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-shutdown.sh
@@ -47,7 +47,7 @@ cat /proc/mounts
 
 test "$umount_proc" && umount /proc && rmdir /proc
 
-# ioctl(TIOC_DRAIN) to drain tty messages to console
+# tcsattr(tty, TIOCDRAIN, mode) to drain tty messages to console
 test -t 1 && stty cooked 0<&1
 
 # Execute the command systemd told us to ...
-- 
2.7.1




More information about the openbmc mailing list