tree-wide: fix lseek() parameter order
The offset must be specified first, 'whence' second. Fix that. Except for one case this fix doesn't actually fix any real bug, since SEEK_SET is defined as 0 anyway, hence the swapped arguments have no effect. The one exception is the MTD smartmedia code, which I guess indicates that noone has been using that hw anymore in a long time?
This commit is contained in:
@@ -365,7 +365,7 @@ static int raw_pull_make_local_copy(RawPull *i) {
|
||||
assert(i->raw_job->disk_fd >= 0);
|
||||
assert(i->offset == UINT64_MAX);
|
||||
|
||||
if (lseek(i->raw_job->disk_fd, SEEK_SET, 0) < 0)
|
||||
if (lseek(i->raw_job->disk_fd, 0, SEEK_SET) < 0)
|
||||
return log_error_errno(errno, "Failed to seek to beginning of vendor image: %m");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user