summaryrefslogtreecommitdiff
path: root/pm/power.d/sata_alpm
diff options
context:
space:
mode:
authorVictor Lowther <victor.lowther@gmail.com>2010-06-14 15:10:52 -0500
committerVictor Lowther <victor.lowther@gmail.com>2010-06-15 06:37:39 -0500
commitcb0ad2d4e13972810ebbe2a979b5cb37d740149a (patch)
tree4a1ef3d2ce86b29da1b86522a7b00fbf06ba1b28 /pm/power.d/sata_alpm
parentb540f8f5c4fffad793d0a4938feb80d6f1f04c18 (diff)
Make powersave hooks a little more verbose.
Diffstat (limited to 'pm/power.d/sata_alpm')
-rw-r--r--pm/power.d/sata_alpm6
1 files changed, 4 insertions, 2 deletions
diff --git a/pm/power.d/sata_alpm b/pm/power.d/sata_alpm
index 6391e09..dbe4117 100644
--- a/pm/power.d/sata_alpm
+++ b/pm/power.d/sata_alpm
@@ -27,8 +27,10 @@ set_sata_alpm() {
[ "$kv" ] || exit $NA #for paranoia's sake
[ "${kv%-*}" \< "2.6.33" ] && exit $NA # avoid fs corruption
for f in /sys/class/scsi_host/host*/link_power_management_policy; do
- [ -w "$f" ] || continue
- echo "$1" > "$f"
+ [ -w "$f/link_power_management_policy" ] || continue
+ printf "Setting SATA APLM on %s to %s..." "${f##*/}" "$1"
+ echo "$1" > "$f/link_power_management_policy" && echo Done. || \
+ echo Failed.
done
}