mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 21:52:45 +00:00 
			
		
		
		
	 b5da0b78eb
			
		
	
	
		b5da0b78eb
		
	
	
	
	
		
			
			This has been a FIXME for a long time. We now apply the provided read/write permissions to the constructed FileDescription when opening a File object via File::open().
		
			
				
	
	
		
			31 lines
		
	
	
	
		
			541 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
	
		
			541 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #include <Kernel/FileSystem/File.h>
 | |
| #include <Kernel/FileSystem/FileDescription.h>
 | |
| 
 | |
| File::File()
 | |
| {
 | |
| }
 | |
| 
 | |
| File::~File()
 | |
| {
 | |
| }
 | |
| 
 | |
| KResultOr<NonnullRefPtr<FileDescription>> File::open(int options)
 | |
| {
 | |
|     auto description = FileDescription::create(*this);
 | |
|     description->set_rw_mode(options);
 | |
|     return description;
 | |
| }
 | |
| 
 | |
| void File::close()
 | |
| {
 | |
| }
 | |
| 
 | |
| int File::ioctl(FileDescription&, unsigned, unsigned)
 | |
| {
 | |
|     return -ENOTTY;
 | |
| }
 | |
| 
 | |
| KResultOr<Region*> File::mmap(Process&, FileDescription&, VirtualAddress, size_t, size_t, int)
 | |
| {
 | |
|     return KResult(-ENODEV);
 | |
| }
 |