mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 15:32:46 +00:00 
			
		
		
		
	Kernel: Rename FileDescriptor to FileDescription.
After reading a bunch of POSIX specs, I've learned that a file descriptor is the number that refers to a file description, not the description itself. So this patch renames FileDescriptor to FileDescription, and Process now has FileDescription* file_description(int fd).
This commit is contained in:
		
							parent
							
								
									69a6ce90df
								
							
						
					
					
						commit
						08cd75ac4b
					
				
					 70 changed files with 373 additions and 373 deletions
				
			
		|  | @ -23,7 +23,7 @@ enum class ShouldBlock | |||
|     Yes = 1 | ||||
| }; | ||||
| 
 | ||||
| class FileDescriptor; | ||||
| class FileDescription; | ||||
| 
 | ||||
| class Socket : public File { | ||||
| public: | ||||
|  | @ -40,15 +40,15 @@ public: | |||
|     KResult listen(int backlog); | ||||
| 
 | ||||
|     virtual KResult bind(const sockaddr*, socklen_t) = 0; | ||||
|     virtual KResult connect(FileDescriptor&, const sockaddr*, socklen_t, ShouldBlock) = 0; | ||||
|     virtual KResult connect(FileDescription&, const sockaddr*, socklen_t, ShouldBlock) = 0; | ||||
|     virtual bool get_local_address(sockaddr*, socklen_t*) = 0; | ||||
|     virtual bool get_peer_address(sockaddr*, socklen_t*) = 0; | ||||
|     virtual bool is_local() const { return false; } | ||||
|     virtual bool is_ipv4() const { return false; } | ||||
|     virtual void attach(FileDescriptor&) = 0; | ||||
|     virtual void detach(FileDescriptor&) = 0; | ||||
|     virtual ssize_t sendto(FileDescriptor&, const void*, size_t, int flags, const sockaddr*, socklen_t) = 0; | ||||
|     virtual ssize_t recvfrom(FileDescriptor&, void*, size_t, int flags, sockaddr*, socklen_t*) = 0; | ||||
|     virtual void attach(FileDescription&) = 0; | ||||
|     virtual void detach(FileDescription&) = 0; | ||||
|     virtual ssize_t sendto(FileDescription&, const void*, size_t, int flags, const sockaddr*, socklen_t) = 0; | ||||
|     virtual ssize_t recvfrom(FileDescription&, void*, size_t, int flags, sockaddr*, socklen_t*) = 0; | ||||
| 
 | ||||
|     KResult setsockopt(int level, int option, const void*, socklen_t); | ||||
|     KResult getsockopt(int level, int option, void*, socklen_t*); | ||||
|  | @ -62,7 +62,7 @@ public: | |||
| 
 | ||||
|     Lock& lock() { return m_lock; } | ||||
| 
 | ||||
|     virtual String absolute_path(const FileDescriptor&) const override; | ||||
|     virtual String absolute_path(const FileDescription&) const override; | ||||
| 
 | ||||
| protected: | ||||
|     Socket(int domain, int type, int protocol); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling