mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 02:12:09 -05:00
IDEChannel: Fix wait_until_not_busy() (#7084)
The time_elapsed variable would count until milliseconds_timeout + 1, so a != comparision won't work.
This commit is contained in:
parent
8693c925a0
commit
28a6a9a08f
1 changed files with 2 additions and 2 deletions
|
@ -269,7 +269,7 @@ bool IDEChannel::wait_until_not_busy(bool slave, size_t milliseconds_timeout)
|
|||
IO::delay(1000);
|
||||
time_elapsed++;
|
||||
}
|
||||
return time_elapsed != milliseconds_timeout;
|
||||
return time_elapsed <= milliseconds_timeout;
|
||||
}
|
||||
|
||||
bool IDEChannel::wait_until_not_busy(size_t milliseconds_timeout)
|
||||
|
@ -279,7 +279,7 @@ bool IDEChannel::wait_until_not_busy(size_t milliseconds_timeout)
|
|||
IO::delay(1000);
|
||||
time_elapsed++;
|
||||
}
|
||||
return time_elapsed != milliseconds_timeout;
|
||||
return time_elapsed <= milliseconds_timeout;
|
||||
}
|
||||
|
||||
String IDEChannel::channel_type_string() const
|
||||
|
|
Loading…
Add table
Reference in a new issue