Thank you for sending your patch. Your patch has been added to the github repository.
Regards,
Nivedita
-----Original Message-----
From: PowerTop [mailto:powertop-bounces@lists.01.org] On Behalf Of
xiechj(a)mail2.sysu.edu.cn
Sent: Friday, April 29, 2016 7:05 AM
To: powertop(a)lists.01.org
Subject: [Powertop] [PATCH] Throw error message when system cmd returns
Non-zero value.
From: Madper Xie <madper.xie(a)canonical.com>
hciconfig returns 0 when succeed.
Signed-off-by: Madper Xie <madper.xie(a)canonical.com>
---
src/tuning/bluetooth.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/tuning/bluetooth.cpp b/src/tuning/bluetooth.cpp index
dab46d7..2958849 100644
--- a/src/tuning/bluetooth.cpp
+++ b/src/tuning/bluetooth.cpp
@@ -176,11 +176,11 @@ void bt_tunable::toggle(void)
good = good_bad();
if (good == TUNE_GOOD) {
- if(!system("/usr/sbin/hciconfig hci0 up &> /dev/null &"))
+ if(system("/usr/sbin/hciconfig hci0 up &> /dev/null &"))
printf("System is not available\n");
return;
}
- if(!system("/usr/sbin/hciconfig hci0 down &> /dev/null"))
+ if(system("/usr/sbin/hciconfig hci0 down &> /dev/null"))
printf("System is not available\n");
}
--
2.7.4
_______________________________________________
PowerTop mailing list
PowerTop(a)lists.01.org
https://lists.01.org/mailman/listinfo/powertop