Add the basic character devices to kernel.

This commit is contained in:
Andreas Kling 2018-10-16 14:33:16 +02:00
commit aec8ab0a60
Notes: sideshowbarker 2024-07-19 18:47:17 +09:00
13 changed files with 52 additions and 58 deletions

View file

@ -2,8 +2,7 @@
#include "Limits.h"
#include "sys-errno.h"
#include <AK/StdLib.h>
#include <cstring>
#include <cstdio>
#include <AK/kstdio.h>
FullDevice::FullDevice()
{
@ -15,7 +14,7 @@ FullDevice::~FullDevice()
Unix::ssize_t FullDevice::read(byte* buffer, Unix::size_t bufferSize)
{
printf("read from full device\n");
kprintf("FullDevice: read from full\n");
Unix::size_t count = min(GoodBufferSize, bufferSize);
memset(buffer, 0, count);
return count;