14649fe05SIngo Weinhold /* 24649fe05SIngo Weinhold * Copyright 2001-2009, Ingo Weinhold, ingo_weinhold@gmx.de. 34649fe05SIngo Weinhold * Distributed under the terms of the MIT License. 44649fe05SIngo Weinhold */ 55d3147f6SIngo Weinhold 65d3147f6SIngo Weinhold #include "Volume.h" 75d3147f6SIngo Weinhold 8ed07b9c7SIngo Weinhold #include <dirent.h> 9ed07b9c7SIngo Weinhold #include <string.h> 10ed07b9c7SIngo Weinhold #include <sys/stat.h> 11ed07b9c7SIngo Weinhold 129accd619SIngo Weinhold #include "FileSystem.h" 13ed07b9c7SIngo Weinhold #include "kernel_emu.h" 14ed07b9c7SIngo Weinhold 159accd619SIngo Weinhold 165d3147f6SIngo Weinhold // constructor 17245aecdaSAxel Dörfler Volume::Volume(FileSystem* fileSystem, dev_t id) 185d3147f6SIngo Weinhold : fFileSystem(fileSystem), 195d3147f6SIngo Weinhold fID(id) 205d3147f6SIngo Weinhold { 219accd619SIngo Weinhold fFileSystem->RegisterVolume(this); 225d3147f6SIngo Weinhold } 235d3147f6SIngo Weinhold 245d3147f6SIngo Weinhold // destructor 255d3147f6SIngo Weinhold Volume::~Volume() 265d3147f6SIngo Weinhold { 279accd619SIngo Weinhold fFileSystem->UnregisterVolume(this); 285d3147f6SIngo Weinhold } 295d3147f6SIngo Weinhold 305d3147f6SIngo Weinhold // GetFileSystem 315d3147f6SIngo Weinhold UserlandFS::FileSystem* 325d3147f6SIngo Weinhold Volume::GetFileSystem() const 335d3147f6SIngo Weinhold { 345d3147f6SIngo Weinhold return fFileSystem; 355d3147f6SIngo Weinhold } 365d3147f6SIngo Weinhold 375d3147f6SIngo Weinhold // GetID 38245aecdaSAxel Dörfler dev_t 395d3147f6SIngo Weinhold Volume::GetID() const 405d3147f6SIngo Weinhold { 415d3147f6SIngo Weinhold return fID; 425d3147f6SIngo Weinhold } 435d3147f6SIngo Weinhold 448474904eSIngo Weinhold 458474904eSIngo Weinhold // #pragma mark - FS 468474904eSIngo Weinhold 475d3147f6SIngo Weinhold 485d3147f6SIngo Weinhold // Mount 495d3147f6SIngo Weinhold status_t 508474904eSIngo Weinhold Volume::Mount(const char* device, uint32 flags, const char* parameters, 51245aecdaSAxel Dörfler ino_t* rootID) 525d3147f6SIngo Weinhold { 535d3147f6SIngo Weinhold return B_BAD_VALUE; 545d3147f6SIngo Weinhold } 555d3147f6SIngo Weinhold 565d3147f6SIngo Weinhold // Unmount 575d3147f6SIngo Weinhold status_t 585d3147f6SIngo Weinhold Volume::Unmount() 595d3147f6SIngo Weinhold { 605d3147f6SIngo Weinhold return B_BAD_VALUE; 615d3147f6SIngo Weinhold } 625d3147f6SIngo Weinhold 635d3147f6SIngo Weinhold // Sync 645d3147f6SIngo Weinhold status_t 655d3147f6SIngo Weinhold Volume::Sync() 665d3147f6SIngo Weinhold { 675d3147f6SIngo Weinhold return B_BAD_VALUE; 685d3147f6SIngo Weinhold } 695d3147f6SIngo Weinhold 708474904eSIngo Weinhold // ReadFSInfo 715d3147f6SIngo Weinhold status_t 728474904eSIngo Weinhold Volume::ReadFSInfo(fs_info* info) 735d3147f6SIngo Weinhold { 745d3147f6SIngo Weinhold return B_BAD_VALUE; 755d3147f6SIngo Weinhold } 765d3147f6SIngo Weinhold 778474904eSIngo Weinhold // WriteFSInfo 785d3147f6SIngo Weinhold status_t 798474904eSIngo Weinhold Volume::WriteFSInfo(const struct fs_info* info, uint32 mask) 805d3147f6SIngo Weinhold { 815d3147f6SIngo Weinhold return B_BAD_VALUE; 825d3147f6SIngo Weinhold } 835d3147f6SIngo Weinhold 848474904eSIngo Weinhold 858474904eSIngo Weinhold // #pragma mark - vnodes 868474904eSIngo Weinhold 878474904eSIngo Weinhold 888474904eSIngo Weinhold // Lookup 898474904eSIngo Weinhold status_t 90cdebdeb0SIngo Weinhold Volume::Lookup(void* dir, const char* entryName, ino_t* vnid) 918474904eSIngo Weinhold { 928474904eSIngo Weinhold return B_BAD_VALUE; 938474904eSIngo Weinhold } 945d3147f6SIngo Weinhold 959accd619SIngo Weinhold 969accd619SIngo Weinhold // GetVNodeType 979accd619SIngo Weinhold status_t 989accd619SIngo Weinhold Volume::GetVNodeType(void* node, int* type) 999accd619SIngo Weinhold { 1009accd619SIngo Weinhold return B_NOT_SUPPORTED; 1019accd619SIngo Weinhold } 1029accd619SIngo Weinhold 1039accd619SIngo Weinhold 104ed07b9c7SIngo Weinhold // GetVNodeName 105ed07b9c7SIngo Weinhold status_t 106cdebdeb0SIngo Weinhold Volume::GetVNodeName(void* node, char* buffer, size_t bufferSize) 107ed07b9c7SIngo Weinhold { 108ed07b9c7SIngo Weinhold // stat the node to get its ID 109ed07b9c7SIngo Weinhold struct stat st; 110ed07b9c7SIngo Weinhold status_t error = ReadStat(node, &st); 111ed07b9c7SIngo Weinhold if (error != B_OK) 112ed07b9c7SIngo Weinhold return error; 113ed07b9c7SIngo Weinhold 114ed07b9c7SIngo Weinhold // look up the parent directory 115245aecdaSAxel Dörfler ino_t parentID; 116f6583b4aSIngo Weinhold error = Lookup(node, "..", &parentID); 117ed07b9c7SIngo Weinhold if (error != B_OK) 118ed07b9c7SIngo Weinhold return error; 119ed07b9c7SIngo Weinhold 120ed07b9c7SIngo Weinhold // get the parent node handle 121cdebdeb0SIngo Weinhold void* parentNode; 122ed07b9c7SIngo Weinhold error = UserlandFS::KernelEmu::get_vnode(GetID(), parentID, &parentNode); 123ed07b9c7SIngo Weinhold // Lookup() has already called get_vnode() for us, so we need to put it once 124ed07b9c7SIngo Weinhold UserlandFS::KernelEmu::put_vnode(GetID(), parentID); 125ed07b9c7SIngo Weinhold if (error != B_OK) 126ed07b9c7SIngo Weinhold return error; 127ed07b9c7SIngo Weinhold 128ed07b9c7SIngo Weinhold // open the parent dir 129cdebdeb0SIngo Weinhold void* cookie; 130ed07b9c7SIngo Weinhold error = OpenDir(parentNode, &cookie); 131ed07b9c7SIngo Weinhold if (error == B_OK) { 132ed07b9c7SIngo Weinhold 133ed07b9c7SIngo Weinhold while (true) { 134ed07b9c7SIngo Weinhold // read an entry 135ed07b9c7SIngo Weinhold char _entry[sizeof(struct dirent) + B_FILE_NAME_LENGTH]; 136ed07b9c7SIngo Weinhold struct dirent* entry = (struct dirent*)_entry; 137ed07b9c7SIngo Weinhold uint32 num; 138ed07b9c7SIngo Weinhold 139ed07b9c7SIngo Weinhold error = ReadDir(parentNode, cookie, entry, sizeof(_entry), 1, &num); 140ed07b9c7SIngo Weinhold 141ed07b9c7SIngo Weinhold if (error != B_OK) 142ed07b9c7SIngo Weinhold break; 143ed07b9c7SIngo Weinhold if (num == 0) { 144ed07b9c7SIngo Weinhold error = B_ENTRY_NOT_FOUND; 145ed07b9c7SIngo Weinhold break; 146ed07b9c7SIngo Weinhold } 147ed07b9c7SIngo Weinhold 148ed07b9c7SIngo Weinhold // found an entry for our node? 149ed07b9c7SIngo Weinhold if (st.st_ino == entry->d_ino) { 150ed07b9c7SIngo Weinhold // yep, copy the entry name 151ed07b9c7SIngo Weinhold size_t nameLen = strnlen(entry->d_name, B_FILE_NAME_LENGTH); 152ed07b9c7SIngo Weinhold if (nameLen < bufferSize) { 153ed07b9c7SIngo Weinhold memcpy(buffer, entry->d_name, nameLen); 154ed07b9c7SIngo Weinhold buffer[nameLen] = '\0'; 155ed07b9c7SIngo Weinhold } else 156ed07b9c7SIngo Weinhold error = B_BUFFER_OVERFLOW; 157ed07b9c7SIngo Weinhold break; 158ed07b9c7SIngo Weinhold } 159ed07b9c7SIngo Weinhold } 160ed07b9c7SIngo Weinhold 161ed07b9c7SIngo Weinhold // close the parent dir 162ed07b9c7SIngo Weinhold CloseDir(parentNode, cookie); 163ed07b9c7SIngo Weinhold FreeDirCookie(parentNode, cookie); 164ed07b9c7SIngo Weinhold } 165ed07b9c7SIngo Weinhold 166ed07b9c7SIngo Weinhold // put the parent node 167ed07b9c7SIngo Weinhold UserlandFS::KernelEmu::put_vnode(GetID(), parentID); 168ed07b9c7SIngo Weinhold 169ed07b9c7SIngo Weinhold return error; 170ed07b9c7SIngo Weinhold } 171ed07b9c7SIngo Weinhold 1725d3147f6SIngo Weinhold // ReadVNode 1735d3147f6SIngo Weinhold status_t 174cdebdeb0SIngo Weinhold Volume::ReadVNode(ino_t vnid, bool reenter, void** node, int* type, 1754649fe05SIngo Weinhold uint32* flags, FSVNodeCapabilities* _capabilities) 1765d3147f6SIngo Weinhold { 1775d3147f6SIngo Weinhold return B_BAD_VALUE; 1785d3147f6SIngo Weinhold } 1795d3147f6SIngo Weinhold 1805d3147f6SIngo Weinhold // WriteVNode 1815d3147f6SIngo Weinhold status_t 182cdebdeb0SIngo Weinhold Volume::WriteVNode(void* node, bool reenter) 1835d3147f6SIngo Weinhold { 1845d3147f6SIngo Weinhold return B_BAD_VALUE; 1855d3147f6SIngo Weinhold } 1865d3147f6SIngo Weinhold 1875d3147f6SIngo Weinhold // RemoveVNode 1885d3147f6SIngo Weinhold status_t 189cdebdeb0SIngo Weinhold Volume::RemoveVNode(void* node, bool reenter) 1905d3147f6SIngo Weinhold { 1915d3147f6SIngo Weinhold return B_BAD_VALUE; 1925d3147f6SIngo Weinhold } 1935d3147f6SIngo Weinhold 1945d3147f6SIngo Weinhold 195f1c6ce08SIngo Weinhold // #pragma mark - asynchronous I/O 196f1c6ce08SIngo Weinhold 197f1c6ce08SIngo Weinhold 198f1c6ce08SIngo Weinhold status_t 1997c1ffcb9SIngo Weinhold Volume::DoIO(void* node, void* cookie, const IORequestInfo& requestInfo) 200f1c6ce08SIngo Weinhold { 201f1c6ce08SIngo Weinhold return B_BAD_VALUE; 202f1c6ce08SIngo Weinhold } 203f1c6ce08SIngo Weinhold 204f1c6ce08SIngo Weinhold 205f1c6ce08SIngo Weinhold status_t 206f1c6ce08SIngo Weinhold Volume::CancelIO(void* node, void* cookie, int32 ioRequestID) 207f1c6ce08SIngo Weinhold { 208f1c6ce08SIngo Weinhold return B_BAD_VALUE; 209f1c6ce08SIngo Weinhold } 210f1c6ce08SIngo Weinhold 211f1c6ce08SIngo Weinhold 212c76e8d36SIngo Weinhold status_t 213c76e8d36SIngo Weinhold Volume::IterativeIOGetVecs(void* cookie, int32 requestID, off_t offset, 214c76e8d36SIngo Weinhold size_t size, struct file_io_vec* vecs, size_t* _count) 215c76e8d36SIngo Weinhold { 216c76e8d36SIngo Weinhold return B_BAD_VALUE; 217c76e8d36SIngo Weinhold } 218c76e8d36SIngo Weinhold 219c76e8d36SIngo Weinhold 220c76e8d36SIngo Weinhold status_t 221c76e8d36SIngo Weinhold Volume::IterativeIOFinished(void* cookie, int32 requestID, status_t status, 222c76e8d36SIngo Weinhold bool partialTransfer, size_t bytesTransferred) 223c76e8d36SIngo Weinhold { 224c76e8d36SIngo Weinhold return B_BAD_VALUE; 225c76e8d36SIngo Weinhold } 226c76e8d36SIngo Weinhold 227c76e8d36SIngo Weinhold 2288474904eSIngo Weinhold // #pragma mark - nodes 2295d3147f6SIngo Weinhold 2305d3147f6SIngo Weinhold 2315d3147f6SIngo Weinhold // IOCtl 2325d3147f6SIngo Weinhold status_t 233cdebdeb0SIngo Weinhold Volume::IOCtl(void* node, void* cookie, uint32 command, void *buffer, 2345d3147f6SIngo Weinhold size_t size) 2355d3147f6SIngo Weinhold { 2365d3147f6SIngo Weinhold return B_BAD_VALUE; 2375d3147f6SIngo Weinhold } 2385d3147f6SIngo Weinhold 2395d3147f6SIngo Weinhold // SetFlags 2405d3147f6SIngo Weinhold status_t 241cdebdeb0SIngo Weinhold Volume::SetFlags(void* node, void* cookie, int flags) 2425d3147f6SIngo Weinhold { 2435d3147f6SIngo Weinhold return B_BAD_VALUE; 2445d3147f6SIngo Weinhold } 2455d3147f6SIngo Weinhold 2465d3147f6SIngo Weinhold // Select 2475d3147f6SIngo Weinhold status_t 248cdebdeb0SIngo Weinhold Volume::Select(void* node, void* cookie, uint8 event, selectsync* sync) 2495d3147f6SIngo Weinhold { 2505d3147f6SIngo Weinhold return B_BAD_VALUE; 2515d3147f6SIngo Weinhold } 2525d3147f6SIngo Weinhold 2535d3147f6SIngo Weinhold // Deselect 2545d3147f6SIngo Weinhold status_t 255cdebdeb0SIngo Weinhold Volume::Deselect(void* node, void* cookie, uint8 event, selectsync* sync) 2565d3147f6SIngo Weinhold { 2575d3147f6SIngo Weinhold return B_BAD_VALUE; 2585d3147f6SIngo Weinhold } 2595d3147f6SIngo Weinhold 2608474904eSIngo Weinhold // FSync 2618474904eSIngo Weinhold status_t 262cdebdeb0SIngo Weinhold Volume::FSync(void* node) 2638474904eSIngo Weinhold { 2648474904eSIngo Weinhold return B_BAD_VALUE; 2658474904eSIngo Weinhold } 2668474904eSIngo Weinhold 2678474904eSIngo Weinhold // ReadSymlink 2688474904eSIngo Weinhold status_t 269cdebdeb0SIngo Weinhold Volume::ReadSymlink(void* node, char* buffer, size_t bufferSize, 2708474904eSIngo Weinhold size_t* bytesRead) 2718474904eSIngo Weinhold { 2728474904eSIngo Weinhold return B_BAD_VALUE; 2738474904eSIngo Weinhold } 2748474904eSIngo Weinhold 2758474904eSIngo Weinhold // CreateSymlink 2768474904eSIngo Weinhold status_t 277cdebdeb0SIngo Weinhold Volume::CreateSymlink(void* dir, const char* name, const char* target, 2788474904eSIngo Weinhold int mode) 2798474904eSIngo Weinhold { 2808474904eSIngo Weinhold return B_BAD_VALUE; 2818474904eSIngo Weinhold } 2825d3147f6SIngo Weinhold 2835d3147f6SIngo Weinhold // Link 2845d3147f6SIngo Weinhold status_t 285cdebdeb0SIngo Weinhold Volume::Link(void* dir, const char* name, void* node) 2865d3147f6SIngo Weinhold { 2875d3147f6SIngo Weinhold return B_BAD_VALUE; 2885d3147f6SIngo Weinhold } 2895d3147f6SIngo Weinhold 2905d3147f6SIngo Weinhold // Unlink 2915d3147f6SIngo Weinhold status_t 292cdebdeb0SIngo Weinhold Volume::Unlink(void* dir, const char* name) 2935d3147f6SIngo Weinhold { 2945d3147f6SIngo Weinhold return B_BAD_VALUE; 2955d3147f6SIngo Weinhold } 2965d3147f6SIngo Weinhold 2975d3147f6SIngo Weinhold // Rename 2985d3147f6SIngo Weinhold status_t 299cdebdeb0SIngo Weinhold Volume::Rename(void* oldDir, const char* oldName, void* newDir, 3005d3147f6SIngo Weinhold const char* newName) 3015d3147f6SIngo Weinhold { 3025d3147f6SIngo Weinhold return B_BAD_VALUE; 3035d3147f6SIngo Weinhold } 3045d3147f6SIngo Weinhold 3058474904eSIngo Weinhold // Access 3065d3147f6SIngo Weinhold status_t 307cdebdeb0SIngo Weinhold Volume::Access(void* node, int mode) 3085d3147f6SIngo Weinhold { 3095d3147f6SIngo Weinhold return B_BAD_VALUE; 3105d3147f6SIngo Weinhold } 3115d3147f6SIngo Weinhold 3128474904eSIngo Weinhold // ReadStat 3135d3147f6SIngo Weinhold status_t 314cdebdeb0SIngo Weinhold Volume::ReadStat(void* node, struct stat* st) 3158474904eSIngo Weinhold { 3168474904eSIngo Weinhold return B_BAD_VALUE; 3178474904eSIngo Weinhold } 3188474904eSIngo Weinhold 3198474904eSIngo Weinhold // WriteStat 3208474904eSIngo Weinhold status_t 321cdebdeb0SIngo Weinhold Volume::WriteStat(void* node, const struct stat *st, uint32 mask) 3228474904eSIngo Weinhold { 3238474904eSIngo Weinhold return B_BAD_VALUE; 3248474904eSIngo Weinhold } 3258474904eSIngo Weinhold 3268474904eSIngo Weinhold 3278474904eSIngo Weinhold // #pragma mark - files 3288474904eSIngo Weinhold 3298474904eSIngo Weinhold 3308474904eSIngo Weinhold // Create 3318474904eSIngo Weinhold status_t 332cdebdeb0SIngo Weinhold Volume::Create(void* dir, const char* name, int openMode, int mode, 333cdebdeb0SIngo Weinhold void** cookie, ino_t* vnid) 3348474904eSIngo Weinhold { 3358474904eSIngo Weinhold return B_BAD_VALUE; 3368474904eSIngo Weinhold } 3378474904eSIngo Weinhold 3388474904eSIngo Weinhold // Open 3398474904eSIngo Weinhold status_t 340cdebdeb0SIngo Weinhold Volume::Open(void* node, int openMode, void** cookie) 3418474904eSIngo Weinhold { 3428474904eSIngo Weinhold return B_BAD_VALUE; 3438474904eSIngo Weinhold } 3448474904eSIngo Weinhold 3458474904eSIngo Weinhold // Close 3468474904eSIngo Weinhold status_t 347cdebdeb0SIngo Weinhold Volume::Close(void* node, void* cookie) 3488474904eSIngo Weinhold { 3498474904eSIngo Weinhold return B_BAD_VALUE; 3508474904eSIngo Weinhold } 3518474904eSIngo Weinhold 3528474904eSIngo Weinhold // FreeCookie 3538474904eSIngo Weinhold status_t 354cdebdeb0SIngo Weinhold Volume::FreeCookie(void* node, void* cookie) 3558474904eSIngo Weinhold { 3568474904eSIngo Weinhold return B_BAD_VALUE; 3578474904eSIngo Weinhold } 3588474904eSIngo Weinhold 3598474904eSIngo Weinhold // Read 3608474904eSIngo Weinhold status_t 361cdebdeb0SIngo Weinhold Volume::Read(void* node, void* cookie, off_t pos, void* buffer, 3628474904eSIngo Weinhold size_t bufferSize, size_t* bytesRead) 3638474904eSIngo Weinhold { 3648474904eSIngo Weinhold return B_BAD_VALUE; 3658474904eSIngo Weinhold } 3668474904eSIngo Weinhold 3678474904eSIngo Weinhold // Write 3688474904eSIngo Weinhold status_t 369cdebdeb0SIngo Weinhold Volume::Write(void* node, void* cookie, off_t pos, const void* buffer, 3708474904eSIngo Weinhold size_t bufferSize, size_t* bytesWritten) 3718474904eSIngo Weinhold { 3728474904eSIngo Weinhold return B_BAD_VALUE; 3738474904eSIngo Weinhold } 3748474904eSIngo Weinhold 3758474904eSIngo Weinhold 3768474904eSIngo Weinhold // #pragma mark - directories 3778474904eSIngo Weinhold 3788474904eSIngo Weinhold 3798474904eSIngo Weinhold // CreateDir 3808474904eSIngo Weinhold status_t 381*3cf43c26SIngo Weinhold Volume::CreateDir(void* dir, const char* name, int mode) 3828474904eSIngo Weinhold { 3838474904eSIngo Weinhold return B_BAD_VALUE; 3848474904eSIngo Weinhold } 3858474904eSIngo Weinhold 3868474904eSIngo Weinhold // RemoveDir 3878474904eSIngo Weinhold status_t 388cdebdeb0SIngo Weinhold Volume::RemoveDir(void* dir, const char* name) 3895d3147f6SIngo Weinhold { 3905d3147f6SIngo Weinhold return B_BAD_VALUE; 3915d3147f6SIngo Weinhold } 3925d3147f6SIngo Weinhold 3935d3147f6SIngo Weinhold // OpenDir 3945d3147f6SIngo Weinhold status_t 395cdebdeb0SIngo Weinhold Volume::OpenDir(void* node, void** cookie) 3965d3147f6SIngo Weinhold { 3975d3147f6SIngo Weinhold return B_BAD_VALUE; 3985d3147f6SIngo Weinhold } 3995d3147f6SIngo Weinhold 4005d3147f6SIngo Weinhold // CloseDir 4015d3147f6SIngo Weinhold status_t 402cdebdeb0SIngo Weinhold Volume::CloseDir(void* node, void* cookie) 4035d3147f6SIngo Weinhold { 4045d3147f6SIngo Weinhold return B_BAD_VALUE; 4055d3147f6SIngo Weinhold } 4065d3147f6SIngo Weinhold 4075d3147f6SIngo Weinhold // FreeDirCookie 4085d3147f6SIngo Weinhold status_t 409cdebdeb0SIngo Weinhold Volume::FreeDirCookie(void* node, void* cookie) 4105d3147f6SIngo Weinhold { 4115d3147f6SIngo Weinhold return B_BAD_VALUE; 4125d3147f6SIngo Weinhold } 4135d3147f6SIngo Weinhold 4145d3147f6SIngo Weinhold // ReadDir 4155d3147f6SIngo Weinhold status_t 416cdebdeb0SIngo Weinhold Volume::ReadDir(void* node, void* cookie, void* buffer, size_t bufferSize, 4178474904eSIngo Weinhold uint32 count, uint32* countRead) 4185d3147f6SIngo Weinhold { 4195d3147f6SIngo Weinhold return B_BAD_VALUE; 4205d3147f6SIngo Weinhold } 4215d3147f6SIngo Weinhold 4225d3147f6SIngo Weinhold // RewindDir 4235d3147f6SIngo Weinhold status_t 424cdebdeb0SIngo Weinhold Volume::RewindDir(void* node, void* cookie) 4255d3147f6SIngo Weinhold { 4265d3147f6SIngo Weinhold return B_BAD_VALUE; 4275d3147f6SIngo Weinhold } 4285d3147f6SIngo Weinhold 4295d3147f6SIngo Weinhold 4308474904eSIngo Weinhold // #pragma mark - attribute directories 4318474904eSIngo Weinhold 4325d3147f6SIngo Weinhold 4335d3147f6SIngo Weinhold // OpenAttrDir 4345d3147f6SIngo Weinhold status_t 435cdebdeb0SIngo Weinhold Volume::OpenAttrDir(void* node, void** cookie) 4365d3147f6SIngo Weinhold { 4375d3147f6SIngo Weinhold return B_BAD_VALUE; 4385d3147f6SIngo Weinhold } 4395d3147f6SIngo Weinhold 4405d3147f6SIngo Weinhold // CloseAttrDir 4415d3147f6SIngo Weinhold status_t 442cdebdeb0SIngo Weinhold Volume::CloseAttrDir(void* node, void* cookie) 4435d3147f6SIngo Weinhold { 4445d3147f6SIngo Weinhold return B_BAD_VALUE; 4455d3147f6SIngo Weinhold } 4465d3147f6SIngo Weinhold 4475d3147f6SIngo Weinhold // FreeAttrDirCookie 4485d3147f6SIngo Weinhold status_t 449cdebdeb0SIngo Weinhold Volume::FreeAttrDirCookie(void* node, void* cookie) 4505d3147f6SIngo Weinhold { 4515d3147f6SIngo Weinhold return B_BAD_VALUE; 4525d3147f6SIngo Weinhold } 4535d3147f6SIngo Weinhold 4545d3147f6SIngo Weinhold // ReadAttrDir 4555d3147f6SIngo Weinhold status_t 456cdebdeb0SIngo Weinhold Volume::ReadAttrDir(void* node, void* cookie, void* buffer, 4578474904eSIngo Weinhold size_t bufferSize, uint32 count, uint32* countRead) 4585d3147f6SIngo Weinhold { 4595d3147f6SIngo Weinhold return B_BAD_VALUE; 4605d3147f6SIngo Weinhold } 4615d3147f6SIngo Weinhold 4625d3147f6SIngo Weinhold // RewindAttrDir 4635d3147f6SIngo Weinhold status_t 464cdebdeb0SIngo Weinhold Volume::RewindAttrDir(void* node, void* cookie) 4655d3147f6SIngo Weinhold { 4665d3147f6SIngo Weinhold return B_BAD_VALUE; 4675d3147f6SIngo Weinhold } 4685d3147f6SIngo Weinhold 4698474904eSIngo Weinhold 4708474904eSIngo Weinhold // #pragma mark - attributes 4718474904eSIngo Weinhold 4728474904eSIngo Weinhold 473617ed3e4SIngo Weinhold // CreateAttr 474617ed3e4SIngo Weinhold status_t 475cdebdeb0SIngo Weinhold Volume::CreateAttr(void* node, const char* name, uint32 type, int openMode, 476cdebdeb0SIngo Weinhold void** cookie) 477617ed3e4SIngo Weinhold { 478617ed3e4SIngo Weinhold return B_BAD_VALUE; 479617ed3e4SIngo Weinhold } 480617ed3e4SIngo Weinhold 481617ed3e4SIngo Weinhold // OpenAttr 482617ed3e4SIngo Weinhold status_t 483cdebdeb0SIngo Weinhold Volume::OpenAttr(void* node, const char* name, int openMode, 484cdebdeb0SIngo Weinhold void** cookie) 485617ed3e4SIngo Weinhold { 486617ed3e4SIngo Weinhold return B_BAD_VALUE; 487617ed3e4SIngo Weinhold } 488617ed3e4SIngo Weinhold 489617ed3e4SIngo Weinhold // CloseAttr 490617ed3e4SIngo Weinhold status_t 491cdebdeb0SIngo Weinhold Volume::CloseAttr(void* node, void* cookie) 492617ed3e4SIngo Weinhold { 493617ed3e4SIngo Weinhold return B_BAD_VALUE; 494617ed3e4SIngo Weinhold } 495617ed3e4SIngo Weinhold 496617ed3e4SIngo Weinhold // FreeAttrCookie 497617ed3e4SIngo Weinhold status_t 498cdebdeb0SIngo Weinhold Volume::FreeAttrCookie(void* node, void* cookie) 499617ed3e4SIngo Weinhold { 500617ed3e4SIngo Weinhold return B_BAD_VALUE; 501617ed3e4SIngo Weinhold } 502617ed3e4SIngo Weinhold 5035d3147f6SIngo Weinhold // ReadAttr 5045d3147f6SIngo Weinhold status_t 505cdebdeb0SIngo Weinhold Volume::ReadAttr(void* node, void* cookie, off_t pos, void* buffer, 5068474904eSIngo Weinhold size_t bufferSize, size_t* bytesRead) 5075d3147f6SIngo Weinhold { 5085d3147f6SIngo Weinhold return B_BAD_VALUE; 5095d3147f6SIngo Weinhold } 5105d3147f6SIngo Weinhold 5115d3147f6SIngo Weinhold // WriteAttr 5125d3147f6SIngo Weinhold status_t 513cdebdeb0SIngo Weinhold Volume::WriteAttr(void* node, void* cookie, off_t pos, 5145d3147f6SIngo Weinhold const void* buffer, size_t bufferSize, size_t* bytesWritten) 5155d3147f6SIngo Weinhold { 5165d3147f6SIngo Weinhold return B_BAD_VALUE; 5175d3147f6SIngo Weinhold } 5185d3147f6SIngo Weinhold 519ed07b9c7SIngo Weinhold // ReadAttrStat 5205d3147f6SIngo Weinhold status_t 521cdebdeb0SIngo Weinhold Volume::ReadAttrStat(void* node, void* cookie, struct stat *st) 5225d3147f6SIngo Weinhold { 5235d3147f6SIngo Weinhold return B_BAD_VALUE; 5245d3147f6SIngo Weinhold } 5255d3147f6SIngo Weinhold 526ed07b9c7SIngo Weinhold // WriteAttrStat 527ed07b9c7SIngo Weinhold status_t 528cdebdeb0SIngo Weinhold Volume::WriteAttrStat(void* node, void* cookie, const struct stat* st, 529ed07b9c7SIngo Weinhold int statMask) 530ed07b9c7SIngo Weinhold { 531ed07b9c7SIngo Weinhold return B_BAD_VALUE; 532ed07b9c7SIngo Weinhold } 533ed07b9c7SIngo Weinhold 5348474904eSIngo Weinhold // RenameAttr 5358474904eSIngo Weinhold status_t 536cdebdeb0SIngo Weinhold Volume::RenameAttr(void* oldNode, const char* oldName, void* newNode, 5378474904eSIngo Weinhold const char* newName) 5388474904eSIngo Weinhold { 5398474904eSIngo Weinhold return B_BAD_VALUE; 5408474904eSIngo Weinhold } 5418474904eSIngo Weinhold 5428474904eSIngo Weinhold // RemoveAttr 5438474904eSIngo Weinhold status_t 544cdebdeb0SIngo Weinhold Volume::RemoveAttr(void* node, const char* name) 5458474904eSIngo Weinhold { 5468474904eSIngo Weinhold return B_BAD_VALUE; 5478474904eSIngo Weinhold } 5488474904eSIngo Weinhold 5498474904eSIngo Weinhold 5508474904eSIngo Weinhold // #pragma mark - indices 5518474904eSIngo Weinhold 5525d3147f6SIngo Weinhold 5535d3147f6SIngo Weinhold // OpenIndexDir 5545d3147f6SIngo Weinhold status_t 555cdebdeb0SIngo Weinhold Volume::OpenIndexDir(void** cookie) 5565d3147f6SIngo Weinhold { 5575d3147f6SIngo Weinhold return B_BAD_VALUE; 5585d3147f6SIngo Weinhold } 5595d3147f6SIngo Weinhold 5605d3147f6SIngo Weinhold // CloseIndexDir 5615d3147f6SIngo Weinhold status_t 562cdebdeb0SIngo Weinhold Volume::CloseIndexDir(void* cookie) 5635d3147f6SIngo Weinhold { 5645d3147f6SIngo Weinhold return B_BAD_VALUE; 5655d3147f6SIngo Weinhold } 5665d3147f6SIngo Weinhold 5675d3147f6SIngo Weinhold // FreeIndexDirCookie 5685d3147f6SIngo Weinhold status_t 569cdebdeb0SIngo Weinhold Volume::FreeIndexDirCookie(void* cookie) 5705d3147f6SIngo Weinhold { 5715d3147f6SIngo Weinhold return B_BAD_VALUE; 5725d3147f6SIngo Weinhold } 5735d3147f6SIngo Weinhold 5745d3147f6SIngo Weinhold // ReadIndexDir 5755d3147f6SIngo Weinhold status_t 576cdebdeb0SIngo Weinhold Volume::ReadIndexDir(void* cookie, void* buffer, size_t bufferSize, 5778474904eSIngo Weinhold uint32 count, uint32* countRead) 5785d3147f6SIngo Weinhold { 5795d3147f6SIngo Weinhold return B_BAD_VALUE; 5805d3147f6SIngo Weinhold } 5815d3147f6SIngo Weinhold 5825d3147f6SIngo Weinhold // RewindIndexDir 5835d3147f6SIngo Weinhold status_t 584cdebdeb0SIngo Weinhold Volume::RewindIndexDir(void* cookie) 5855d3147f6SIngo Weinhold { 5865d3147f6SIngo Weinhold return B_BAD_VALUE; 5875d3147f6SIngo Weinhold } 5885d3147f6SIngo Weinhold 5895d3147f6SIngo Weinhold // CreateIndex 5905d3147f6SIngo Weinhold status_t 5918474904eSIngo Weinhold Volume::CreateIndex(const char* name, uint32 type, uint32 flags) 5925d3147f6SIngo Weinhold { 5935d3147f6SIngo Weinhold return B_BAD_VALUE; 5945d3147f6SIngo Weinhold } 5955d3147f6SIngo Weinhold 5965d3147f6SIngo Weinhold // RemoveIndex 5975d3147f6SIngo Weinhold status_t 5985d3147f6SIngo Weinhold Volume::RemoveIndex(const char* name) 5995d3147f6SIngo Weinhold { 6005d3147f6SIngo Weinhold return B_BAD_VALUE; 6015d3147f6SIngo Weinhold } 6025d3147f6SIngo Weinhold 6038474904eSIngo Weinhold // ReadIndexStat 6045d3147f6SIngo Weinhold status_t 6058474904eSIngo Weinhold Volume::ReadIndexStat(const char *name, struct stat *st) 6065d3147f6SIngo Weinhold { 6075d3147f6SIngo Weinhold return B_BAD_VALUE; 6085d3147f6SIngo Weinhold } 6095d3147f6SIngo Weinhold 6105d3147f6SIngo Weinhold 6118474904eSIngo Weinhold // #pragma mark - queries 6128474904eSIngo Weinhold 6135d3147f6SIngo Weinhold 6145d3147f6SIngo Weinhold // OpenQuery 6155d3147f6SIngo Weinhold status_t 6168474904eSIngo Weinhold Volume::OpenQuery(const char* queryString, uint32 flags, port_id port, 617cdebdeb0SIngo Weinhold uint32 token, void** cookie) 6185d3147f6SIngo Weinhold { 6195d3147f6SIngo Weinhold return B_BAD_VALUE; 6205d3147f6SIngo Weinhold } 6215d3147f6SIngo Weinhold 6225d3147f6SIngo Weinhold // CloseQuery 6235d3147f6SIngo Weinhold status_t 624cdebdeb0SIngo Weinhold Volume::CloseQuery(void* cookie) 6255d3147f6SIngo Weinhold { 6265d3147f6SIngo Weinhold return B_BAD_VALUE; 6275d3147f6SIngo Weinhold } 6285d3147f6SIngo Weinhold 6295d3147f6SIngo Weinhold // FreeQueryCookie 6305d3147f6SIngo Weinhold status_t 631cdebdeb0SIngo Weinhold Volume::FreeQueryCookie(void* cookie) 6325d3147f6SIngo Weinhold { 6335d3147f6SIngo Weinhold return B_BAD_VALUE; 6345d3147f6SIngo Weinhold } 6355d3147f6SIngo Weinhold 6365d3147f6SIngo Weinhold // ReadQuery 6375d3147f6SIngo Weinhold status_t 638cdebdeb0SIngo Weinhold Volume::ReadQuery(void* cookie, void* buffer, size_t bufferSize, 6398474904eSIngo Weinhold uint32 count, uint32* countRead) 6405d3147f6SIngo Weinhold { 6415d3147f6SIngo Weinhold return B_BAD_VALUE; 6425d3147f6SIngo Weinhold } 6435d3147f6SIngo Weinhold 644ed07b9c7SIngo Weinhold // RewindQuery 645ed07b9c7SIngo Weinhold status_t 646cdebdeb0SIngo Weinhold Volume::RewindQuery(void* cookie) 647ed07b9c7SIngo Weinhold { 648ed07b9c7SIngo Weinhold return B_BAD_VALUE; 649ed07b9c7SIngo Weinhold } 650ed07b9c7SIngo Weinhold 651