mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 17:52:45 +00:00 
			
		
		
		
	Kernel: Implement fchdir syscall
The fchdir() function is equivalent to chdir() except that the directory that is to be the new current working directory is specified by a file descriptor.
This commit is contained in:
		
							parent
							
								
									26e81ad574
								
							
						
					
					
						commit
						7d85fc00e4
					
				
					 6 changed files with 24 additions and 0 deletions
				
			
		|  | @ -265,6 +265,12 @@ int chdir(const char* path) | |||
|     __RETURN_WITH_ERRNO(rc, rc, -1); | ||||
| } | ||||
| 
 | ||||
| int fchdir(int fd) | ||||
| { | ||||
|     int rc = syscall(SC_fchdir, fd); | ||||
|     __RETURN_WITH_ERRNO(rc, rc, -1); | ||||
| } | ||||
| 
 | ||||
| char* getcwd(char* buffer, size_t size) | ||||
| { | ||||
|     if (!buffer) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Mauri de Souza Nunes
						Mauri de Souza Nunes