mirror of
https://github.com/systemd/systemd.git
synced 2026-07-22 15:30:54 +00:00
firmware_helper: fix write count
This commit is contained in:
committed by
Kay Sievers
parent
f432183eb8
commit
609435bad6
@@ -118,9 +118,9 @@ int main(int argc, char **argv) {
|
||||
|
||||
count = 0;
|
||||
while (count < fw_buffer_size) {
|
||||
int c;
|
||||
ssize_t c;
|
||||
|
||||
c = write(fw_fd, fw_buffer+count, fw_buffer_size);
|
||||
c = write(fw_fd, fw_buffer+count, fw_buffer_size-count);
|
||||
if (c <= 0) {
|
||||
rc = errno;
|
||||
close(fw_fd);
|
||||
|
||||
Reference in New Issue
Block a user