mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
cpictl: Suppress messages for unwritable sysfs files
Under certain conditions, e.g. in a KVM guest, a write operation to /sys/firmware/cpi/set can result in an error message to stderr while the script returns with a zero exit code, indicating success. This can cause confusion if cpictl is called by systemd due to the existence of a writable /sys/firmware/cpi/. Let's silence cpictl when writing to the /sys/firmware/cpi/set. This is OK, as nothing can be inferred from failure or success from the perspective of the invoking Linux instance. Fixes: https://github.com/ibm-s390-linux/s390-tools/issues/120 Signed-off-by: Viktor Mihajlovski <mihajlov@linux.ibm.com> Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
11b401b599
commit
b79d17d233
@@ -109,7 +109,7 @@ fail_with()
|
||||
|
||||
cpi_commit()
|
||||
{
|
||||
echo 1 > "$CPI_SET"
|
||||
echo 1 > "$CPI_SET" 2> /dev/null
|
||||
}
|
||||
|
||||
do_length_check()
|
||||
|
||||
Reference in New Issue
Block a user