23 #include "pedigree/kernel/Log.h" 25 #include "modules/system/vfs/Directory.h" 26 #include "modules/system/vfs/File.h" 27 #include "modules/system/vfs/Filesystem.h" 28 #include "pedigree/kernel/machine/InputManager.h" 29 #include "pedigree/kernel/utilities/ExtensibleBitmap.h" 31 #include "modules/system/console/TextIO.h" 33 #include "pedigree/kernel/graphics/Graphics.h" 34 #include "pedigree/kernel/graphics/GraphicsService.h" 36 #include "modules/subsys/posix/PsAuxFile.h" 37 #include "modules/subsys/posix/VirtualTerminal.h" 39 #define DEVFS_NUMTTYS 7 44 extern DevFs *g_pDevFs;
50 :
File(str, 0, 0, 0, inode, pParentFS, 0, pParent)
53 FILE_UR | FILE_UW | FILE_GR | FILE_GW | FILE_OR | FILE_OW);
62 uint64_t location, uint64_t size, uintptr_t buffer,
63 bool bCanBlock =
true);
65 uint64_t location, uint64_t size, uintptr_t buffer,
66 bool bCanBlock =
true);
79 :
File(str, 0, 0, 0, inode, pParentFS, 0, pParentNode)
82 FILE_UR | FILE_UW | FILE_GR | FILE_GW | FILE_OR | FILE_OW);
91 uint64_t location, uint64_t size, uintptr_t buffer,
92 bool bCanBlock =
true);
94 uint64_t location, uint64_t size, uintptr_t buffer,
95 bool bCanBlock =
true);
108 :
File(str, 0, 0, 0, inode, pParentFS, 0, pParentNode)
111 FILE_UR | FILE_UW | FILE_GR | FILE_GW | FILE_OR | FILE_OW);
120 uint64_t location, uint64_t size, uintptr_t buffer,
121 bool bCanBlock =
true);
123 uint64_t location, uint64_t size, uintptr_t buffer,
124 bool bCanBlock =
true);
142 uint64_t location, uint64_t size, uintptr_t buffer,
143 bool bCanBlock =
true);
145 uint64_t location, uint64_t size, uintptr_t buffer,
146 bool bCanBlock =
true);
166 :
File(
String(
"rtc"), 0, 0, 0, inode, pParentFS, 0, pParentNode)
177 uint64_t location, uint64_t size, uintptr_t buffer,
178 bool bCanBlock =
true);
180 uint64_t location, uint64_t size, uintptr_t buffer,
181 bool bCanBlock =
true);
184 virtual int command(
const size_t command,
void *buffer);
202 virtual uintptr_t
readBlock(uint64_t location);
205 virtual int command(
const size_t command,
void *buffer);
225 uint64_t location, uint64_t size, uintptr_t buffer,
226 bool bCanBlock =
true);
228 uint64_t location, uint64_t size, uintptr_t buffer,
229 bool bCanBlock =
true);
248 :
File(name, 0, 0, 0, inode, pParentFS, 0, pParentNode)
251 FILE_UR | FILE_UW | FILE_GR | FILE_GW | FILE_OR | FILE_OW);
269 String name, Time::Timestamp accessedTime, Time::Timestamp modifiedTime,
270 Time::Timestamp creationTime, uintptr_t inode,
class Filesystem *pFs,
271 size_t size,
File *pParent)
273 name, accessedTime, modifiedTime, creationTime, inode, pFs, size,
282 addDirectoryEntry(name, pFile);
290 DevFs() : m_pRoot(0), m_pTty(0), m_VtManager(0), m_pPsAuxFile(0)
296 virtual bool initialise(
Disk *pDisk);
307 virtual size_t getNextInode();
308 virtual void revertInode();
347 TextIO *m_pTtys[DEVFS_NUMTTYS];
348 File *m_pTtyFiles[DEVFS_NUMTTYS];
virtual String getVolumeLabel() const
virtual File * getRoot() const
virtual int command(const size_t command, void *buffer)
virtual bool isBytewise() const
void setUidOnly(size_t uid)
virtual physical_uintptr_t getPhysicalPage(size_t offset)
virtual void returnPhysicalPage(size_t offset)
GraphicsService::GraphicsParameters * m_pGraphicsParameters
virtual bool createDirectory(File *parent, const String &filename, uint32_t mask)
virtual bool supports(const size_t command) const
virtual bool isBytewise() const
virtual bool createFile(File *parent, const String &filename, uint32_t mask)
virtual bool isBytewise() const
void setPermissionsOnly(uint32_t perms)
virtual bool createSymlink(File *parent, const String &filename, const String &value)
virtual uint64_t writeBytewise(uint64_t location, uint64_t size, uintptr_t buffer, bool bCanBlock=true)
void setGidOnly(size_t gid)
virtual uintptr_t readBlock(uint64_t location)
virtual bool isBytewise() const
virtual bool isBytewise() const
virtual uint64_t readBytewise(uint64_t location, uint64_t size, uintptr_t buffer, bool bCanBlock=true)
virtual bool isBytewise() const