15d3147f6SIngo Weinhold // Volume.cpp 25d3147f6SIngo Weinhold 35d3147f6SIngo Weinhold #include "Volume.h" 45d3147f6SIngo Weinhold 5ed07b9c7SIngo Weinhold #include <dirent.h> 6ed07b9c7SIngo Weinhold #include <string.h> 7ed07b9c7SIngo Weinhold #include <sys/stat.h> 8ed07b9c7SIngo Weinhold 9ed07b9c7SIngo Weinhold #include "kernel_emu.h" 10ed07b9c7SIngo Weinhold 115d3147f6SIngo Weinhold // constructor 12*245aecdaSAxel Dörfler Volume::Volume(FileSystem* fileSystem, dev_t id) 135d3147f6SIngo Weinhold : fFileSystem(fileSystem), 145d3147f6SIngo Weinhold fID(id) 155d3147f6SIngo Weinhold { 165d3147f6SIngo Weinhold } 175d3147f6SIngo Weinhold 185d3147f6SIngo Weinhold // destructor 195d3147f6SIngo Weinhold Volume::~Volume() 205d3147f6SIngo Weinhold { 215d3147f6SIngo Weinhold } 225d3147f6SIngo Weinhold 235d3147f6SIngo Weinhold // GetFileSystem 245d3147f6SIngo Weinhold UserlandFS::FileSystem* 255d3147f6SIngo Weinhold Volume::GetFileSystem() const 265d3147f6SIngo Weinhold { 275d3147f6SIngo Weinhold return fFileSystem; 285d3147f6SIngo Weinhold } 295d3147f6SIngo Weinhold 305d3147f6SIngo Weinhold // GetID 31*245aecdaSAxel Dörfler dev_t 325d3147f6SIngo Weinhold Volume::GetID() const 335d3147f6SIngo Weinhold { 345d3147f6SIngo Weinhold return fID; 355d3147f6SIngo Weinhold } 365d3147f6SIngo Weinhold 378474904eSIngo Weinhold 388474904eSIngo Weinhold // #pragma mark - FS 398474904eSIngo Weinhold 405d3147f6SIngo Weinhold 415d3147f6SIngo Weinhold // Mount 425d3147f6SIngo Weinhold status_t 438474904eSIngo Weinhold Volume::Mount(const char* device, uint32 flags, const char* parameters, 44*245aecdaSAxel Dörfler ino_t* rootID) 455d3147f6SIngo Weinhold { 465d3147f6SIngo Weinhold return B_BAD_VALUE; 475d3147f6SIngo Weinhold } 485d3147f6SIngo Weinhold 495d3147f6SIngo Weinhold // Unmount 505d3147f6SIngo Weinhold status_t 515d3147f6SIngo Weinhold Volume::Unmount() 525d3147f6SIngo Weinhold { 535d3147f6SIngo Weinhold return B_BAD_VALUE; 545d3147f6SIngo Weinhold } 555d3147f6SIngo Weinhold 565d3147f6SIngo Weinhold // Sync 575d3147f6SIngo Weinhold status_t 585d3147f6SIngo Weinhold Volume::Sync() 595d3147f6SIngo Weinhold { 605d3147f6SIngo Weinhold return B_BAD_VALUE; 615d3147f6SIngo Weinhold } 625d3147f6SIngo Weinhold 638474904eSIngo Weinhold // ReadFSInfo 645d3147f6SIngo Weinhold status_t 658474904eSIngo Weinhold Volume::ReadFSInfo(fs_info* info) 665d3147f6SIngo Weinhold { 675d3147f6SIngo Weinhold return B_BAD_VALUE; 685d3147f6SIngo Weinhold } 695d3147f6SIngo Weinhold 708474904eSIngo Weinhold // WriteFSInfo 715d3147f6SIngo Weinhold status_t 728474904eSIngo Weinhold Volume::WriteFSInfo(const struct fs_info* info, uint32 mask) 735d3147f6SIngo Weinhold { 745d3147f6SIngo Weinhold return B_BAD_VALUE; 755d3147f6SIngo Weinhold } 765d3147f6SIngo Weinhold 778474904eSIngo Weinhold 788474904eSIngo Weinhold // #pragma mark - vnodes 798474904eSIngo Weinhold 808474904eSIngo Weinhold 818474904eSIngo Weinhold // Lookup 828474904eSIngo Weinhold status_t 83*245aecdaSAxel Dörfler Volume::Lookup(fs_vnode dir, const char* entryName, ino_t* vnid, int* type) 848474904eSIngo Weinhold { 858474904eSIngo Weinhold return B_BAD_VALUE; 868474904eSIngo Weinhold } 875d3147f6SIngo Weinhold 88ed07b9c7SIngo Weinhold // LookupNoType 89ed07b9c7SIngo Weinhold status_t 90*245aecdaSAxel Dörfler Volume::LookupNoType(fs_vnode dir, const char* entryName, ino_t* vnid) 91ed07b9c7SIngo Weinhold { 92ed07b9c7SIngo Weinhold int type; 93ed07b9c7SIngo Weinhold return Lookup(dir, entryName, vnid, &type); 94ed07b9c7SIngo Weinhold } 95ed07b9c7SIngo Weinhold 96ed07b9c7SIngo Weinhold // GetVNodeName 97ed07b9c7SIngo Weinhold status_t 98ed07b9c7SIngo Weinhold Volume::GetVNodeName(fs_vnode node, char* buffer, size_t bufferSize) 99ed07b9c7SIngo Weinhold { 100ed07b9c7SIngo Weinhold // stat the node to get its ID 101ed07b9c7SIngo Weinhold struct stat st; 102ed07b9c7SIngo Weinhold status_t error = ReadStat(node, &st); 103ed07b9c7SIngo Weinhold if (error != B_OK) 104ed07b9c7SIngo Weinhold return error; 105ed07b9c7SIngo Weinhold 106ed07b9c7SIngo Weinhold // look up the parent directory 107*245aecdaSAxel Dörfler ino_t parentID; 108ed07b9c7SIngo Weinhold error = LookupNoType(node, "..", &parentID); 109ed07b9c7SIngo Weinhold if (error != B_OK) 110ed07b9c7SIngo Weinhold return error; 111ed07b9c7SIngo Weinhold 112ed07b9c7SIngo Weinhold // get the parent node handle 113ed07b9c7SIngo Weinhold fs_vnode parentNode; 114ed07b9c7SIngo Weinhold error = UserlandFS::KernelEmu::get_vnode(GetID(), parentID, &parentNode); 115ed07b9c7SIngo Weinhold // Lookup() has already called get_vnode() for us, so we need to put it once 116ed07b9c7SIngo Weinhold UserlandFS::KernelEmu::put_vnode(GetID(), parentID); 117ed07b9c7SIngo Weinhold if (error != B_OK) 118ed07b9c7SIngo Weinhold return error; 119ed07b9c7SIngo Weinhold 120ed07b9c7SIngo Weinhold // open the parent dir 121ed07b9c7SIngo Weinhold fs_cookie cookie; 122ed07b9c7SIngo Weinhold error = OpenDir(parentNode, &cookie); 123ed07b9c7SIngo Weinhold if (error == B_OK) { 124ed07b9c7SIngo Weinhold 125ed07b9c7SIngo Weinhold while (true) { 126ed07b9c7SIngo Weinhold // read an entry 127ed07b9c7SIngo Weinhold char _entry[sizeof(struct dirent) + B_FILE_NAME_LENGTH]; 128ed07b9c7SIngo Weinhold struct dirent* entry = (struct dirent*)_entry; 129ed07b9c7SIngo Weinhold uint32 num; 130ed07b9c7SIngo Weinhold 131ed07b9c7SIngo Weinhold error = ReadDir(parentNode, cookie, entry, sizeof(_entry), 1, &num); 132ed07b9c7SIngo Weinhold 133ed07b9c7SIngo Weinhold if (error != B_OK) 134ed07b9c7SIngo Weinhold break; 135ed07b9c7SIngo Weinhold if (num == 0) { 136ed07b9c7SIngo Weinhold error = B_ENTRY_NOT_FOUND; 137ed07b9c7SIngo Weinhold break; 138ed07b9c7SIngo Weinhold } 139ed07b9c7SIngo Weinhold 140ed07b9c7SIngo Weinhold // found an entry for our node? 141ed07b9c7SIngo Weinhold if (st.st_ino == entry->d_ino) { 142ed07b9c7SIngo Weinhold // yep, copy the entry name 143ed07b9c7SIngo Weinhold size_t nameLen = strnlen(entry->d_name, B_FILE_NAME_LENGTH); 144ed07b9c7SIngo Weinhold if (nameLen < bufferSize) { 145ed07b9c7SIngo Weinhold memcpy(buffer, entry->d_name, nameLen); 146ed07b9c7SIngo Weinhold buffer[nameLen] = '\0'; 147ed07b9c7SIngo Weinhold } else 148ed07b9c7SIngo Weinhold error = B_BUFFER_OVERFLOW; 149ed07b9c7SIngo Weinhold break; 150ed07b9c7SIngo Weinhold } 151ed07b9c7SIngo Weinhold } 152ed07b9c7SIngo Weinhold 153ed07b9c7SIngo Weinhold // close the parent dir 154ed07b9c7SIngo Weinhold CloseDir(parentNode, cookie); 155ed07b9c7SIngo Weinhold FreeDirCookie(parentNode, cookie); 156ed07b9c7SIngo Weinhold } 157ed07b9c7SIngo Weinhold 158ed07b9c7SIngo Weinhold // put the parent node 159ed07b9c7SIngo Weinhold UserlandFS::KernelEmu::put_vnode(GetID(), parentID); 160ed07b9c7SIngo Weinhold 161ed07b9c7SIngo Weinhold return error; 162ed07b9c7SIngo Weinhold } 163ed07b9c7SIngo Weinhold 1645d3147f6SIngo Weinhold // ReadVNode 1655d3147f6SIngo Weinhold status_t 166*245aecdaSAxel Dörfler Volume::ReadVNode(ino_t vnid, bool reenter, fs_vnode* node) 1675d3147f6SIngo Weinhold { 1685d3147f6SIngo Weinhold return B_BAD_VALUE; 1695d3147f6SIngo Weinhold } 1705d3147f6SIngo Weinhold 1715d3147f6SIngo Weinhold // WriteVNode 1725d3147f6SIngo Weinhold status_t 1738474904eSIngo Weinhold Volume::WriteVNode(fs_vnode node, bool reenter) 1745d3147f6SIngo Weinhold { 1755d3147f6SIngo Weinhold return B_BAD_VALUE; 1765d3147f6SIngo Weinhold } 1775d3147f6SIngo Weinhold 1785d3147f6SIngo Weinhold // RemoveVNode 1795d3147f6SIngo Weinhold status_t 1808474904eSIngo Weinhold Volume::RemoveVNode(fs_vnode node, bool reenter) 1815d3147f6SIngo Weinhold { 1825d3147f6SIngo Weinhold return B_BAD_VALUE; 1835d3147f6SIngo Weinhold } 1845d3147f6SIngo Weinhold 1855d3147f6SIngo Weinhold 1868474904eSIngo Weinhold // #pragma mark - nodes 1875d3147f6SIngo Weinhold 1885d3147f6SIngo Weinhold 1895d3147f6SIngo Weinhold // IOCtl 1905d3147f6SIngo Weinhold status_t 1918474904eSIngo Weinhold Volume::IOCtl(fs_vnode node, fs_cookie cookie, uint32 command, void *buffer, 1925d3147f6SIngo Weinhold size_t size) 1935d3147f6SIngo Weinhold { 1945d3147f6SIngo Weinhold return B_BAD_VALUE; 1955d3147f6SIngo Weinhold } 1965d3147f6SIngo Weinhold 1975d3147f6SIngo Weinhold // SetFlags 1985d3147f6SIngo Weinhold status_t 1998474904eSIngo Weinhold Volume::SetFlags(fs_vnode node, fs_cookie cookie, int flags) 2005d3147f6SIngo Weinhold { 2015d3147f6SIngo Weinhold return B_BAD_VALUE; 2025d3147f6SIngo Weinhold } 2035d3147f6SIngo Weinhold 2045d3147f6SIngo Weinhold // Select 2055d3147f6SIngo Weinhold status_t 2068474904eSIngo Weinhold Volume::Select(fs_vnode node, fs_cookie cookie, uint8 event, uint32 ref, 2075d3147f6SIngo Weinhold selectsync* sync) 2085d3147f6SIngo Weinhold { 2095d3147f6SIngo Weinhold return B_BAD_VALUE; 2105d3147f6SIngo Weinhold } 2115d3147f6SIngo Weinhold 2125d3147f6SIngo Weinhold // Deselect 2135d3147f6SIngo Weinhold status_t 2148474904eSIngo Weinhold Volume::Deselect(fs_vnode node, fs_cookie cookie, uint8 event, selectsync* sync) 2155d3147f6SIngo Weinhold { 2165d3147f6SIngo Weinhold return B_BAD_VALUE; 2175d3147f6SIngo Weinhold } 2185d3147f6SIngo Weinhold 2198474904eSIngo Weinhold // FSync 2208474904eSIngo Weinhold status_t 2218474904eSIngo Weinhold Volume::FSync(fs_vnode node) 2228474904eSIngo Weinhold { 2238474904eSIngo Weinhold return B_BAD_VALUE; 2248474904eSIngo Weinhold } 2258474904eSIngo Weinhold 2268474904eSIngo Weinhold // ReadSymlink 2278474904eSIngo Weinhold status_t 2288474904eSIngo Weinhold Volume::ReadSymlink(fs_vnode node, char* buffer, size_t bufferSize, 2298474904eSIngo Weinhold size_t* bytesRead) 2308474904eSIngo Weinhold { 2318474904eSIngo Weinhold return B_BAD_VALUE; 2328474904eSIngo Weinhold } 2338474904eSIngo Weinhold 2348474904eSIngo Weinhold // CreateSymlink 2358474904eSIngo Weinhold status_t 2368474904eSIngo Weinhold Volume::CreateSymlink(fs_vnode dir, const char* name, const char* target, 2378474904eSIngo Weinhold int mode) 2388474904eSIngo Weinhold { 2398474904eSIngo Weinhold return B_BAD_VALUE; 2408474904eSIngo Weinhold } 2415d3147f6SIngo Weinhold 2425d3147f6SIngo Weinhold // Link 2435d3147f6SIngo Weinhold status_t 2448474904eSIngo Weinhold Volume::Link(fs_vnode dir, const char* name, fs_vnode node) 2455d3147f6SIngo Weinhold { 2465d3147f6SIngo Weinhold return B_BAD_VALUE; 2475d3147f6SIngo Weinhold } 2485d3147f6SIngo Weinhold 2495d3147f6SIngo Weinhold // Unlink 2505d3147f6SIngo Weinhold status_t 2518474904eSIngo Weinhold Volume::Unlink(fs_vnode dir, const char* name) 2525d3147f6SIngo Weinhold { 2535d3147f6SIngo Weinhold return B_BAD_VALUE; 2545d3147f6SIngo Weinhold } 2555d3147f6SIngo Weinhold 2565d3147f6SIngo Weinhold // Rename 2575d3147f6SIngo Weinhold status_t 2588474904eSIngo Weinhold Volume::Rename(fs_vnode oldDir, const char* oldName, fs_vnode newDir, 2595d3147f6SIngo Weinhold const char* newName) 2605d3147f6SIngo Weinhold { 2615d3147f6SIngo Weinhold return B_BAD_VALUE; 2625d3147f6SIngo Weinhold } 2635d3147f6SIngo Weinhold 2648474904eSIngo Weinhold // Access 2655d3147f6SIngo Weinhold status_t 2668474904eSIngo Weinhold Volume::Access(fs_vnode node, int mode) 2675d3147f6SIngo Weinhold { 2685d3147f6SIngo Weinhold return B_BAD_VALUE; 2695d3147f6SIngo Weinhold } 2705d3147f6SIngo Weinhold 2718474904eSIngo Weinhold // ReadStat 2725d3147f6SIngo Weinhold status_t 2738474904eSIngo Weinhold Volume::ReadStat(fs_vnode node, struct stat* st) 2748474904eSIngo Weinhold { 2758474904eSIngo Weinhold return B_BAD_VALUE; 2768474904eSIngo Weinhold } 2778474904eSIngo Weinhold 2788474904eSIngo Weinhold // WriteStat 2798474904eSIngo Weinhold status_t 2808474904eSIngo Weinhold Volume::WriteStat(fs_vnode node, const struct stat *st, uint32 mask) 2818474904eSIngo Weinhold { 2828474904eSIngo Weinhold return B_BAD_VALUE; 2838474904eSIngo Weinhold } 2848474904eSIngo Weinhold 2858474904eSIngo Weinhold 2868474904eSIngo Weinhold // #pragma mark - files 2878474904eSIngo Weinhold 2888474904eSIngo Weinhold 2898474904eSIngo Weinhold // Create 2908474904eSIngo Weinhold status_t 2918474904eSIngo Weinhold Volume::Create(fs_vnode dir, const char* name, int openMode, int mode, 292*245aecdaSAxel Dörfler fs_cookie* cookie, ino_t* vnid) 2938474904eSIngo Weinhold { 2948474904eSIngo Weinhold return B_BAD_VALUE; 2958474904eSIngo Weinhold } 2968474904eSIngo Weinhold 2978474904eSIngo Weinhold // Open 2988474904eSIngo Weinhold status_t 2998474904eSIngo Weinhold Volume::Open(fs_vnode node, int openMode, fs_cookie* cookie) 3008474904eSIngo Weinhold { 3018474904eSIngo Weinhold return B_BAD_VALUE; 3028474904eSIngo Weinhold } 3038474904eSIngo Weinhold 3048474904eSIngo Weinhold // Close 3058474904eSIngo Weinhold status_t 3068474904eSIngo Weinhold Volume::Close(fs_vnode node, fs_cookie cookie) 3078474904eSIngo Weinhold { 3088474904eSIngo Weinhold return B_BAD_VALUE; 3098474904eSIngo Weinhold } 3108474904eSIngo Weinhold 3118474904eSIngo Weinhold // FreeCookie 3128474904eSIngo Weinhold status_t 3138474904eSIngo Weinhold Volume::FreeCookie(fs_vnode node, fs_cookie cookie) 3148474904eSIngo Weinhold { 3158474904eSIngo Weinhold return B_BAD_VALUE; 3168474904eSIngo Weinhold } 3178474904eSIngo Weinhold 3188474904eSIngo Weinhold // Read 3198474904eSIngo Weinhold status_t 3208474904eSIngo Weinhold Volume::Read(fs_vnode node, fs_cookie cookie, off_t pos, void* buffer, 3218474904eSIngo Weinhold size_t bufferSize, size_t* bytesRead) 3228474904eSIngo Weinhold { 3238474904eSIngo Weinhold return B_BAD_VALUE; 3248474904eSIngo Weinhold } 3258474904eSIngo Weinhold 3268474904eSIngo Weinhold // Write 3278474904eSIngo Weinhold status_t 3288474904eSIngo Weinhold Volume::Write(fs_vnode node, fs_cookie cookie, off_t pos, const void* buffer, 3298474904eSIngo Weinhold size_t bufferSize, size_t* bytesWritten) 3308474904eSIngo Weinhold { 3318474904eSIngo Weinhold return B_BAD_VALUE; 3328474904eSIngo Weinhold } 3338474904eSIngo Weinhold 3348474904eSIngo Weinhold 3358474904eSIngo Weinhold // #pragma mark - directories 3368474904eSIngo Weinhold 3378474904eSIngo Weinhold 3388474904eSIngo Weinhold // CreateDir 3398474904eSIngo Weinhold status_t 340*245aecdaSAxel Dörfler Volume::CreateDir(fs_vnode dir, const char* name, int mode, ino_t *newDir) 3418474904eSIngo Weinhold { 3428474904eSIngo Weinhold return B_BAD_VALUE; 3438474904eSIngo Weinhold } 3448474904eSIngo Weinhold 3458474904eSIngo Weinhold // RemoveDir 3468474904eSIngo Weinhold status_t 3478474904eSIngo Weinhold Volume::RemoveDir(fs_vnode dir, const char* name) 3485d3147f6SIngo Weinhold { 3495d3147f6SIngo Weinhold return B_BAD_VALUE; 3505d3147f6SIngo Weinhold } 3515d3147f6SIngo Weinhold 3525d3147f6SIngo Weinhold // OpenDir 3535d3147f6SIngo Weinhold status_t 3548474904eSIngo Weinhold Volume::OpenDir(fs_vnode node, fs_cookie* cookie) 3555d3147f6SIngo Weinhold { 3565d3147f6SIngo Weinhold return B_BAD_VALUE; 3575d3147f6SIngo Weinhold } 3585d3147f6SIngo Weinhold 3595d3147f6SIngo Weinhold // CloseDir 3605d3147f6SIngo Weinhold status_t 3618474904eSIngo Weinhold Volume::CloseDir(fs_vnode node, fs_vnode cookie) 3625d3147f6SIngo Weinhold { 3635d3147f6SIngo Weinhold return B_BAD_VALUE; 3645d3147f6SIngo Weinhold } 3655d3147f6SIngo Weinhold 3665d3147f6SIngo Weinhold // FreeDirCookie 3675d3147f6SIngo Weinhold status_t 3688474904eSIngo Weinhold Volume::FreeDirCookie(fs_vnode node, fs_vnode cookie) 3695d3147f6SIngo Weinhold { 3705d3147f6SIngo Weinhold return B_BAD_VALUE; 3715d3147f6SIngo Weinhold } 3725d3147f6SIngo Weinhold 3735d3147f6SIngo Weinhold // ReadDir 3745d3147f6SIngo Weinhold status_t 3758474904eSIngo Weinhold Volume::ReadDir(fs_vnode node, fs_vnode cookie, void* buffer, size_t bufferSize, 3768474904eSIngo Weinhold uint32 count, uint32* countRead) 3775d3147f6SIngo Weinhold { 3785d3147f6SIngo Weinhold return B_BAD_VALUE; 3795d3147f6SIngo Weinhold } 3805d3147f6SIngo Weinhold 3815d3147f6SIngo Weinhold // RewindDir 3825d3147f6SIngo Weinhold status_t 3838474904eSIngo Weinhold Volume::RewindDir(fs_vnode node, fs_vnode cookie) 3845d3147f6SIngo Weinhold { 3855d3147f6SIngo Weinhold return B_BAD_VALUE; 3865d3147f6SIngo Weinhold } 3875d3147f6SIngo Weinhold 3885d3147f6SIngo Weinhold 3898474904eSIngo Weinhold // #pragma mark - attribute directories 3908474904eSIngo Weinhold 3915d3147f6SIngo Weinhold 3925d3147f6SIngo Weinhold // OpenAttrDir 3935d3147f6SIngo Weinhold status_t 3948474904eSIngo Weinhold Volume::OpenAttrDir(fs_vnode node, fs_cookie *cookie) 3955d3147f6SIngo Weinhold { 3965d3147f6SIngo Weinhold return B_BAD_VALUE; 3975d3147f6SIngo Weinhold } 3985d3147f6SIngo Weinhold 3995d3147f6SIngo Weinhold // CloseAttrDir 4005d3147f6SIngo Weinhold status_t 4018474904eSIngo Weinhold Volume::CloseAttrDir(fs_vnode node, fs_cookie cookie) 4025d3147f6SIngo Weinhold { 4035d3147f6SIngo Weinhold return B_BAD_VALUE; 4045d3147f6SIngo Weinhold } 4055d3147f6SIngo Weinhold 4065d3147f6SIngo Weinhold // FreeAttrDirCookie 4075d3147f6SIngo Weinhold status_t 4088474904eSIngo Weinhold Volume::FreeAttrDirCookie(fs_vnode node, fs_cookie cookie) 4095d3147f6SIngo Weinhold { 4105d3147f6SIngo Weinhold return B_BAD_VALUE; 4115d3147f6SIngo Weinhold } 4125d3147f6SIngo Weinhold 4135d3147f6SIngo Weinhold // ReadAttrDir 4145d3147f6SIngo Weinhold status_t 4158474904eSIngo Weinhold Volume::ReadAttrDir(fs_vnode node, fs_cookie cookie, void* buffer, 4168474904eSIngo Weinhold size_t bufferSize, uint32 count, uint32* countRead) 4175d3147f6SIngo Weinhold { 4185d3147f6SIngo Weinhold return B_BAD_VALUE; 4195d3147f6SIngo Weinhold } 4205d3147f6SIngo Weinhold 4215d3147f6SIngo Weinhold // RewindAttrDir 4225d3147f6SIngo Weinhold status_t 4238474904eSIngo Weinhold Volume::RewindAttrDir(fs_vnode node, fs_cookie cookie) 4245d3147f6SIngo Weinhold { 4255d3147f6SIngo Weinhold return B_BAD_VALUE; 4265d3147f6SIngo Weinhold } 4275d3147f6SIngo Weinhold 4288474904eSIngo Weinhold 4298474904eSIngo Weinhold // #pragma mark - attributes 4308474904eSIngo Weinhold 4318474904eSIngo Weinhold 432617ed3e4SIngo Weinhold // CreateAttr 433617ed3e4SIngo Weinhold status_t 434617ed3e4SIngo Weinhold Volume::CreateAttr(fs_vnode node, const char* name, uint32 type, int openMode, 435617ed3e4SIngo Weinhold fs_cookie* cookie) 436617ed3e4SIngo Weinhold { 437617ed3e4SIngo Weinhold return B_BAD_VALUE; 438617ed3e4SIngo Weinhold } 439617ed3e4SIngo Weinhold 440617ed3e4SIngo Weinhold // OpenAttr 441617ed3e4SIngo Weinhold status_t 442617ed3e4SIngo Weinhold Volume::OpenAttr(fs_vnode node, const char* name, int openMode, 443617ed3e4SIngo Weinhold fs_cookie* cookie) 444617ed3e4SIngo Weinhold { 445617ed3e4SIngo Weinhold return B_BAD_VALUE; 446617ed3e4SIngo Weinhold } 447617ed3e4SIngo Weinhold 448617ed3e4SIngo Weinhold // CloseAttr 449617ed3e4SIngo Weinhold status_t 450617ed3e4SIngo Weinhold Volume::CloseAttr(fs_vnode node, fs_cookie cookie) 451617ed3e4SIngo Weinhold { 452617ed3e4SIngo Weinhold return B_BAD_VALUE; 453617ed3e4SIngo Weinhold } 454617ed3e4SIngo Weinhold 455617ed3e4SIngo Weinhold // FreeAttrCookie 456617ed3e4SIngo Weinhold status_t 457617ed3e4SIngo Weinhold Volume::FreeAttrCookie(fs_vnode node, fs_cookie cookie) 458617ed3e4SIngo Weinhold { 459617ed3e4SIngo Weinhold return B_BAD_VALUE; 460617ed3e4SIngo Weinhold } 461617ed3e4SIngo Weinhold 4625d3147f6SIngo Weinhold // ReadAttr 4635d3147f6SIngo Weinhold status_t 4648474904eSIngo Weinhold Volume::ReadAttr(fs_vnode node, fs_cookie cookie, off_t pos, void* buffer, 4658474904eSIngo Weinhold size_t bufferSize, size_t* bytesRead) 4665d3147f6SIngo Weinhold { 4675d3147f6SIngo Weinhold return B_BAD_VALUE; 4685d3147f6SIngo Weinhold } 4695d3147f6SIngo Weinhold 4705d3147f6SIngo Weinhold // WriteAttr 4715d3147f6SIngo Weinhold status_t 4728474904eSIngo Weinhold Volume::WriteAttr(fs_vnode node, fs_cookie cookie, off_t pos, 4735d3147f6SIngo Weinhold const void* buffer, size_t bufferSize, size_t* bytesWritten) 4745d3147f6SIngo Weinhold { 4755d3147f6SIngo Weinhold return B_BAD_VALUE; 4765d3147f6SIngo Weinhold } 4775d3147f6SIngo Weinhold 478ed07b9c7SIngo Weinhold // ReadAttrStat 4795d3147f6SIngo Weinhold status_t 4808474904eSIngo Weinhold Volume::ReadAttrStat(fs_vnode node, fs_cookie cookie, struct stat *st) 4815d3147f6SIngo Weinhold { 4825d3147f6SIngo Weinhold return B_BAD_VALUE; 4835d3147f6SIngo Weinhold } 4845d3147f6SIngo Weinhold 485ed07b9c7SIngo Weinhold // WriteAttrStat 486ed07b9c7SIngo Weinhold status_t 487ed07b9c7SIngo Weinhold Volume::WriteAttrStat(fs_vnode node, fs_cookie cookie, const struct stat* st, 488ed07b9c7SIngo Weinhold int statMask) 489ed07b9c7SIngo Weinhold { 490ed07b9c7SIngo Weinhold return B_BAD_VALUE; 491ed07b9c7SIngo Weinhold } 492ed07b9c7SIngo Weinhold 4938474904eSIngo Weinhold // RenameAttr 4948474904eSIngo Weinhold status_t 4958474904eSIngo Weinhold Volume::RenameAttr(fs_vnode oldNode, const char* oldName, fs_vnode newNode, 4968474904eSIngo Weinhold const char* newName) 4978474904eSIngo Weinhold { 4988474904eSIngo Weinhold return B_BAD_VALUE; 4998474904eSIngo Weinhold } 5008474904eSIngo Weinhold 5018474904eSIngo Weinhold // RemoveAttr 5028474904eSIngo Weinhold status_t 5038474904eSIngo Weinhold Volume::RemoveAttr(fs_vnode node, const char* name) 5048474904eSIngo Weinhold { 5058474904eSIngo Weinhold return B_BAD_VALUE; 5068474904eSIngo Weinhold } 5078474904eSIngo Weinhold 5088474904eSIngo Weinhold 5098474904eSIngo Weinhold // #pragma mark - indices 5108474904eSIngo Weinhold 5115d3147f6SIngo Weinhold 5125d3147f6SIngo Weinhold // OpenIndexDir 5135d3147f6SIngo Weinhold status_t 5148474904eSIngo Weinhold Volume::OpenIndexDir(fs_cookie *cookie) 5155d3147f6SIngo Weinhold { 5165d3147f6SIngo Weinhold return B_BAD_VALUE; 5175d3147f6SIngo Weinhold } 5185d3147f6SIngo Weinhold 5195d3147f6SIngo Weinhold // CloseIndexDir 5205d3147f6SIngo Weinhold status_t 5218474904eSIngo Weinhold Volume::CloseIndexDir(fs_cookie cookie) 5225d3147f6SIngo Weinhold { 5235d3147f6SIngo Weinhold return B_BAD_VALUE; 5245d3147f6SIngo Weinhold } 5255d3147f6SIngo Weinhold 5265d3147f6SIngo Weinhold // FreeIndexDirCookie 5275d3147f6SIngo Weinhold status_t 5288474904eSIngo Weinhold Volume::FreeIndexDirCookie(fs_cookie cookie) 5295d3147f6SIngo Weinhold { 5305d3147f6SIngo Weinhold return B_BAD_VALUE; 5315d3147f6SIngo Weinhold } 5325d3147f6SIngo Weinhold 5335d3147f6SIngo Weinhold // ReadIndexDir 5345d3147f6SIngo Weinhold status_t 5358474904eSIngo Weinhold Volume::ReadIndexDir(fs_cookie cookie, void* buffer, size_t bufferSize, 5368474904eSIngo Weinhold uint32 count, uint32* countRead) 5375d3147f6SIngo Weinhold { 5385d3147f6SIngo Weinhold return B_BAD_VALUE; 5395d3147f6SIngo Weinhold } 5405d3147f6SIngo Weinhold 5415d3147f6SIngo Weinhold // RewindIndexDir 5425d3147f6SIngo Weinhold status_t 5438474904eSIngo Weinhold Volume::RewindIndexDir(fs_cookie cookie) 5445d3147f6SIngo Weinhold { 5455d3147f6SIngo Weinhold return B_BAD_VALUE; 5465d3147f6SIngo Weinhold } 5475d3147f6SIngo Weinhold 5485d3147f6SIngo Weinhold // CreateIndex 5495d3147f6SIngo Weinhold status_t 5508474904eSIngo Weinhold Volume::CreateIndex(const char* name, uint32 type, uint32 flags) 5515d3147f6SIngo Weinhold { 5525d3147f6SIngo Weinhold return B_BAD_VALUE; 5535d3147f6SIngo Weinhold } 5545d3147f6SIngo Weinhold 5555d3147f6SIngo Weinhold // RemoveIndex 5565d3147f6SIngo Weinhold status_t 5575d3147f6SIngo Weinhold Volume::RemoveIndex(const char* name) 5585d3147f6SIngo Weinhold { 5595d3147f6SIngo Weinhold return B_BAD_VALUE; 5605d3147f6SIngo Weinhold } 5615d3147f6SIngo Weinhold 5628474904eSIngo Weinhold // ReadIndexStat 5635d3147f6SIngo Weinhold status_t 5648474904eSIngo Weinhold Volume::ReadIndexStat(const char *name, struct stat *st) 5655d3147f6SIngo Weinhold { 5665d3147f6SIngo Weinhold return B_BAD_VALUE; 5675d3147f6SIngo Weinhold } 5685d3147f6SIngo Weinhold 5695d3147f6SIngo Weinhold 5708474904eSIngo Weinhold // #pragma mark - queries 5718474904eSIngo Weinhold 5725d3147f6SIngo Weinhold 5735d3147f6SIngo Weinhold // OpenQuery 5745d3147f6SIngo Weinhold status_t 5758474904eSIngo Weinhold Volume::OpenQuery(const char* queryString, uint32 flags, port_id port, 5768474904eSIngo Weinhold uint32 token, fs_cookie *cookie) 5775d3147f6SIngo Weinhold { 5785d3147f6SIngo Weinhold return B_BAD_VALUE; 5795d3147f6SIngo Weinhold } 5805d3147f6SIngo Weinhold 5815d3147f6SIngo Weinhold // CloseQuery 5825d3147f6SIngo Weinhold status_t 5838474904eSIngo Weinhold Volume::CloseQuery(fs_cookie cookie) 5845d3147f6SIngo Weinhold { 5855d3147f6SIngo Weinhold return B_BAD_VALUE; 5865d3147f6SIngo Weinhold } 5875d3147f6SIngo Weinhold 5885d3147f6SIngo Weinhold // FreeQueryCookie 5895d3147f6SIngo Weinhold status_t 5908474904eSIngo Weinhold Volume::FreeQueryCookie(fs_cookie cookie) 5915d3147f6SIngo Weinhold { 5925d3147f6SIngo Weinhold return B_BAD_VALUE; 5935d3147f6SIngo Weinhold } 5945d3147f6SIngo Weinhold 5955d3147f6SIngo Weinhold // ReadQuery 5965d3147f6SIngo Weinhold status_t 5978474904eSIngo Weinhold Volume::ReadQuery(fs_cookie cookie, void* buffer, size_t bufferSize, 5988474904eSIngo Weinhold uint32 count, uint32* countRead) 5995d3147f6SIngo Weinhold { 6005d3147f6SIngo Weinhold return B_BAD_VALUE; 6015d3147f6SIngo Weinhold } 6025d3147f6SIngo Weinhold 603ed07b9c7SIngo Weinhold // RewindQuery 604ed07b9c7SIngo Weinhold status_t 605ed07b9c7SIngo Weinhold Volume::RewindQuery(fs_cookie cookie) 606ed07b9c7SIngo Weinhold { 607ed07b9c7SIngo Weinhold return B_BAD_VALUE; 608ed07b9c7SIngo Weinhold } 609ed07b9c7SIngo Weinhold 610