diff --git a/cmdline/mingwapp.c b/cmdline/mingwapp.c index 55ee4369..2d6435b7 100644 --- a/cmdline/mingwapp.c +++ b/cmdline/mingwapp.c @@ -1584,7 +1584,7 @@ static void* thread_spinup(void* arg) /* skip not rotational devices */ if (devpower(devinfo->device, devinfo->name, devinfo->wfile) == 0) - return (void*)-1; + return 0; start = os_tick_ms(); @@ -1624,7 +1624,7 @@ static void* thread_spindown(void* arg) /* skip not rotational devices */ if (devpower(devinfo->device, devinfo->name, devinfo->wfile) == 0) - return (void*)-1; + return 0; start = os_tick_ms(); @@ -1648,6 +1648,10 @@ static void* thread_spindownifup(void* arg) uint64_t start; int power; + /* skip not rotational devices */ + if (devpower(devinfo->device, devinfo->name, devinfo->wfile) == 0) + return 0; + start = os_tick_ms(); if (devdownifup(devinfo->device, devinfo->name, devinfo->smartctl, devinfo->smartctl_info, &power) != 0) { diff --git a/cmdline/unixapp.c b/cmdline/unixapp.c index 7b329f19..86277183 100644 --- a/cmdline/unixapp.c +++ b/cmdline/unixapp.c @@ -3475,7 +3475,7 @@ static void* thread_spinup(void* arg) /* skip not rotational devices */ if (devpower(devinfo->device) == 0) - return (void*)-1; + return 0; start = os_tick_ms(); @@ -3520,7 +3520,7 @@ static void* thread_spindown(void* arg) /* skip not rotational devices */ if (devpower(devinfo->device) == 0) - return (void*)-1; + return 0; start = os_tick_ms(); @@ -3549,6 +3549,10 @@ static void* thread_spindownifup(void* arg) uint64_t start; int power; + /* skip not rotational devices */ + if (devpower(devinfo->device) == 0) + return 0; + start = os_tick_ms(); if (devdownifup(devinfo->device, devinfo->name, devinfo->smartctl, devinfo->smartctl_info, &power) != 0) {