From ce88dfd27ff1333ae577bab747ac9892481d6b59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Thu, 10 Jan 2008 23:26:04 +0000 Subject: [PATCH] BlockHandle goes to devices.cpp git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23367 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../boot/platform/atari_m68k/Handle.cpp | 71 ------------------- 1 file changed, 71 deletions(-) diff --git a/src/system/boot/platform/atari_m68k/Handle.cpp b/src/system/boot/platform/atari_m68k/Handle.cpp index fdbc94552e..c6529eaa7b 100644 --- a/src/system/boot/platform/atari_m68k/Handle.cpp +++ b/src/system/boot/platform/atari_m68k/Handle.cpp @@ -131,74 +131,3 @@ CharHandle::Size() const // 1024 GB } - -// #pragma mark - - - -BlockHandle::BlockHandle(int handle) - : Handle(handle) -{ -} - - -BlockHandle::BlockHandle(void) - : Handle() -{ -} - - -BlockHandle::~BlockHandle() -{ -} - - -status_t -BlockHandle::InitCheck() const -{ - uint32 map = Drvmap(); - if (!(map & (1 << fHandle))) - return ENODEV; - //XXX: check size - return B_OK; -} - - -ssize_t -BlockHandle::ReadAt(void *cookie, off_t pos, void *buffer, size_t bufferSize) -{ - const char *string = (const char *)buffer; - - // can't seek - for (i = 0; i < bufferSize; i++) { - if (Bconstat(fHandle) == 0) - return i; - string[i] = (char)Bconin(fHandle); - } - - return bufferSize; -} - - -ssize_t -BlockHandle::WriteAt(void *cookie, off_t pos, const void *buffer, size_t bufferSize) -{ - const char *string = (const char *)buffer; - - // can't seek - for (i = 0; i < bufferSize; i++) { - Bconout(fHandle, string[i]); - } - - return bufferSize; -} - - -off_t -BlockHandle::Size() const -{ - // ToDo: fix this! - return 1024LL * 1024 * 1024 * 1024; - // 1024 GB -} - -