Refactor syscall.c to follow PintOS styling, w/ E

This commit is contained in:
sBubshait
2024-11-05 23:24:41 +00:00
parent f4290c31f3
commit 02fff62ca2

View File

@@ -161,19 +161,19 @@ syscall_read (int fd, void *buffer, unsigned size)
validate_user_pointer (buffer, size);
if (fd == STDIN_FILENO)
{
/* Reading from the console. */
char *write_buffer = buffer;
for (int i = 0; i < size; i++)
write_buffer[i] = input_getc ();
{
/* Reading from the console. */
char *write_buffer = buffer;
for (int i = 0; i < size; i++)
write_buffer[i] = input_getc ();
return size;
}
return size;
}
else
{
/* Reading from a file. */
return 0; // TODO: Implement Write to Files
}
{
/* Reading from a file. */
return 0; // TODO: Implement Write to Files
}
}
static int