47 if (flags & O_APPEND || flags & O_TRUNC)
52 if ((flags & O_CREAT) && (flags & O_EXCL))
72 if ((file->
flags & O_ACCMODE) == O_WRONLY)
102 if ((file->
flags & O_ACCMODE) == O_RDONLY)
virtual ssize_t read(unsigned int index, void *buf, size_t len)=0
Read from the DeviceFile.
int open(File *file, const char *path, int flags, int mode) OVERRIDE
Open a device.
virtual ssize_t write(unsigned int index, const void *buf, size_t len)=0
Write to the DeviceFile.
int open(File *, const char *, int, int) OVERRIDE
Open method.
OSMutex lock_
protects internal structures.
void unlock()
Unlock a mutex.
off_t offset
current offset within file