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:
Lennart Poettering
2025-11-13 14:19:29 +01:00
parent dbc25d84ae
commit f5452477d4
6 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -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");
}