From bd75d5b8cfad92c6e1d089c9277f650c8cf3ec92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Thu, 11 Sep 2003 00:31:21 +0000 Subject: [PATCH] OpenFirmware handles now report a size of 1024 GB for now - so that the partition modules won't complain about a disk too small to hold a partition. Should be fixed, though. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4614 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/boot/platform/openfirmware/Handle.cpp | 9 +++++++++ src/kernel/boot/platform/openfirmware/Handle.h | 2 ++ 2 files changed, 11 insertions(+) diff --git a/src/kernel/boot/platform/openfirmware/Handle.cpp b/src/kernel/boot/platform/openfirmware/Handle.cpp index 21584f6227..95d863a21a 100644 --- a/src/kernel/boot/platform/openfirmware/Handle.cpp +++ b/src/kernel/boot/platform/openfirmware/Handle.cpp @@ -62,3 +62,12 @@ Handle::WriteAt(void *cookie, off_t pos, const void *buffer, size_t bufferSize) return B_ERROR; } + +off_t +Handle::Size() const +{ + // ToDo: fix this! + return 1024LL * 1024 * 1024 * 1024; + // 1024 GB +} + diff --git a/src/kernel/boot/platform/openfirmware/Handle.h b/src/kernel/boot/platform/openfirmware/Handle.h index 99df56c467..33abf384d8 100644 --- a/src/kernel/boot/platform/openfirmware/Handle.h +++ b/src/kernel/boot/platform/openfirmware/Handle.h @@ -22,6 +22,8 @@ class Handle : public ConsoleNode { virtual ssize_t ReadAt(void *cookie, off_t pos, void *buffer, size_t bufferSize); virtual ssize_t WriteAt(void *cookie, off_t pos, const void *buffer, size_t bufferSize); + virtual off_t Size() const; + protected: int fHandle; bool fOwnHandle;