aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMadper Xie <madper.xie@canonical.com>2016-04-29 22:05:12 +0800
committerNivedita Swaminathan <nivedita.swaminathan@intel.com>2016-04-29 09:16:27 -0700
commit4b8897b49061f897d3b825d3c0b3b8d698f7d9eb (patch)
tree8fff1ae5f9c7889dd42d33fe213c5140d2f8e46d
parent44d78f9cc58c010b64c78d129fb8f1926f5d46bd (diff)
downloadpowertop-2.0-4b8897b49061f897d3b825d3c0b3b8d698f7d9eb.tar.gz
Throw error message when system cmd returns Non-zero value.
hciconfig returns 0 when succeed. Signed-off-by: Madper Xie <madper.xie@canonical.com>
-rw-r--r--src/tuning/bluetooth.cpp4
1 files 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");
}