Skip to content

Commit f4a2ac1

Browse files
committed
Fix bug with /dev/void
1 parent b191b97 commit f4a2ac1

File tree

1 file changed

+1
-1
lines changed
  • kos/src/kernel/core/filesys

1 file changed

+1
-1
lines changed

kos/src/kernel/core/filesys/null.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ devvoid_v_newpart(struct mfile *__restrict UNUSED(self),
417417
vec[i].mc_start = page;
418418
vec[i].mc_size = CONFIG_DEVVOID_PAGE_COUNT;
419419
}
420-
vec[i].mc_size = pages - (i * CONFIG_DEVVOID_PAGE_COUNT);
420+
vec[chunks - 1].mc_size = pages - ((chunks - 1) * CONFIG_DEVVOID_PAGE_COUNT);
421421
result->mp_state = MPART_ST_MEM_SC;
422422
result->mp_mem_sc.ms_v = vec;
423423
result->mp_mem_sc.ms_c = chunks;

0 commit comments

Comments
 (0)