Skip to content

Commit

Permalink
procfs: I/O fixes for procfs
Browse files Browse the repository at this point in the history
  • Loading branch information
jewelcodes committed Oct 6, 2024
1 parent e16e13e commit f777430
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fs/procfs/src/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ void procfsRead(RWCommand *rcmd) {

uint64_t data;
void *ptr = (void *) &data;
size_t size = 0;
size_t size = 8;

switch(file) {
case RESOLVE_KERNEL:
Expand All @@ -98,10 +98,12 @@ void procfsRead(RWCommand *rcmd) {
case RESOLVE_MEMSIZE:
luxSysinfo(sysinfo);
data = sysinfo->memorySize;
size = 4;
break;
case RESOLVE_MEMUSAGE:
luxSysinfo(sysinfo);
data = sysinfo->memoryUsage;
size = 4;
break;
case RESOLVE_UPTIME:
luxSysinfo(sysinfo);
Expand Down

0 comments on commit f777430

Please sign in to comment.