mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	pulse-server: check if a runtime directory could be found
Print an error message and return an error code if all options have been exhausted without success.
This commit is contained in:
		
							parent
							
								
									30e3884a75
								
							
						
					
					
						commit
						e90a70fd49
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -69,6 +69,11 @@ int get_runtime_dir(char *buf, size_t buflen, const char *dir)
 | 
			
		|||
			runtime_dir = result ? result->pw_dir : NULL;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (runtime_dir == NULL) {
 | 
			
		||||
		pw_log_error(NAME": could not find a suitable runtime directory");
 | 
			
		||||
		return -ENOENT;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	size = snprintf(buf, buflen, "%s/%s", runtime_dir, dir);
 | 
			
		||||
	if (size < 0)
 | 
			
		||||
		return -errno;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue