Missed this file to the club.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23476 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
François Revol 2008-01-13 01:54:11 +00:00
parent 02193d0df5
commit c302a6742b
2 changed files with 6 additions and 11 deletions

View File

@ -9,7 +9,7 @@
#include <util/kernel_cpp.h>
#include "Handle.h"
#include "toscalls."
#include "toscalls.h"
/*
* (X)BIOS supports char and block devices with a separate namespace
@ -27,7 +27,7 @@
Handle::Handle(int handle)
:
fHandle((int16)handle),
fHandle((int16)handle)
{
}
@ -97,7 +97,8 @@ CharHandle::~CharHandle()
ssize_t
CharHandle::ReadAt(void *cookie, off_t pos, void *buffer, size_t bufferSize)
{
const char *string = (const char *)buffer;
char *string = (char *)buffer;
int i;
// can't seek
for (i = 0; i < bufferSize; i++) {
@ -114,6 +115,7 @@ ssize_t
CharHandle::WriteAt(void *cookie, off_t pos, const void *buffer, size_t bufferSize)
{
const char *string = (const char *)buffer;
int i;
// can't seek
@ -126,11 +128,3 @@ CharHandle::WriteAt(void *cookie, off_t pos, const void *buffer, size_t bufferSi
}
off_t
CharHandle::Size() const
{
// ToDo: fix this!
return 1024LL * 1024 * 1024 * 1024;
// 1024 GB
}

View File

@ -26,6 +26,7 @@ KernelMergeObject boot_platform_atari_m68k.o :
#bios.S
console.cpp
#serial.cpp
Handle.cpp
devices.cpp
keyboard.cpp
menu.cpp