mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 11:22:45 +00:00 
			
		
		
		
	Get rid of Vnode concept.
We already have an abstraction between Process and Inode/CharacterDevice/FIFO and it's called FileDescriptor. :^)
This commit is contained in:
		
							parent
							
								
									310a5f4199
								
							
						
					
					
						commit
						b46ae2bf09
					
				
					 15 changed files with 204 additions and 376 deletions
				
			
		|  | @ -59,13 +59,23 @@ static int max(int a, int b) | |||
|     return a > b ? a : b; | ||||
| } | ||||
| 
 | ||||
| static int open_ptm() | ||||
| { | ||||
|     char buf[32]; | ||||
|     for (unsigned i = 0; i < 4; ++i) { | ||||
|         sprintf(buf, "/dev/ptm%u", i); | ||||
|         int fd = open(buf, O_RDWR); | ||||
|         if (fd) | ||||
|             return fd; | ||||
|     } | ||||
|     dbgprintf("No master PTY available :(\n"); | ||||
|     exit(1); | ||||
|     return -1; | ||||
| } | ||||
| 
 | ||||
| int main(int, char**) | ||||
| { | ||||
|     int ptm_fd = open("/dev/ptm0", O_RDWR); | ||||
|     if (ptm_fd < 0) { | ||||
|         perror("open"); | ||||
|         return 1; | ||||
|     } | ||||
|     int ptm_fd = open_ptm(); | ||||
| 
 | ||||
|     make_shell(ptm_fd); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling