diff options
author | Lisa Nguyen <lisa.nguyen@linaro.org> | 2015-01-26 17:36:31 -0800 |
---|---|---|
committer | Lisa Nguyen <lisa.nguyen@linaro.org> | 2015-02-02 13:55:27 -0800 |
commit | 155008af4a0f274aedac67b6d982993c13c78020 (patch) | |
tree | 11801685d4b0211d65a0f6aa9bd6ef01410d621c /cpuidle | |
parent | f62f354ef425827b396fc982f0044fdcaf51180d (diff) |
cpuidle: Use is_root() function in cpuidle_03
Instead of using a command to check if the user is root,
use the is_root() function to perform that check in the
cpuidle_03.sh script
Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
Diffstat (limited to 'cpuidle')
-rwxr-xr-x | cpuidle/cpuidle_03.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cpuidle/cpuidle_03.sh b/cpuidle/cpuidle_03.sh index 26d3e28..d82e5e3 100755 --- a/cpuidle/cpuidle_03.sh +++ b/cpuidle/cpuidle_03.sh @@ -29,7 +29,8 @@ CPUIDLE_KILLER=./cpuidle_killer -if [ $(id -u) -ne 0 ]; then +is_root +if [ $? -ne 0 ]; then log_skip "run as non-root" exit 0 fi |