[PATCH] Use STANDBY command to set standby time, not IDLE

Phillip Susi psusi at ubuntu.com
Fri Nov 15 12:29:33 PST 2013


The configuration setting for standby time was being sent
to the drive with the IDLE command, setting the IDLE timer
instead of the STANDBY timer.  Use the right command to set
the right timer.

Signed-off-by: Phillip Susi <psusi at ubuntu.com>
---
 src/udiskslinuxdriveata.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/udiskslinuxdriveata.c b/src/udiskslinuxdriveata.c
index 9d8ce1c..f07a04c 100644
--- a/src/udiskslinuxdriveata.c
+++ b/src/udiskslinuxdriveata.c
@@ -1647,8 +1647,8 @@ apply_configuration_thread_func (gpointer user_data)
 
   if (data->ata_pm_standby != -1)
     {
-      /* ATA8: 7.18 IDLE - E3h, Non-Data */
-      UDisksAtaCommandInput input = {.command = 0xe3, .count = data->ata_pm_standby};
+      /* ATA8: 7.18 STANDBY - E2h, Non-Data */
+      UDisksAtaCommandInput input = {.command = 0xe2, .count = data->ata_pm_standby};
       UDisksAtaCommandOutput output = {0};
       if (!udisks_ata_send_command_sync (fd,
                                          -1,
@@ -1657,7 +1657,7 @@ apply_configuration_thread_func (gpointer user_data)
                                          &output,
                                          &error))
         {
-          udisks_error ("Error sending ATA command IDLE (timeout=%d) to %s: %s (%s, %d)",
+          udisks_error ("Error sending ATA command STANDBY (timeout=%d) to %s: %s (%s, %d)",
                         data->ata_pm_standby, device_file,
                         error->message, g_quark_to_string (error->domain), error->code);
           g_clear_error (&error);
-- 
1.8.3.2



More information about the devkit-devel mailing list