mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	Merge pull request #4918 from YosysHQ/emil/explain-mkdtemp-errno
improve mkdtemp error message
This commit is contained in:
		
						commit
						55595b6c8d
					
				
					 1 changed files with 4 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -413,8 +413,11 @@ std::string make_temp_dir(std::string template_str)
 | 
			
		|||
#  endif
 | 
			
		||||
 | 
			
		||||
	char *p = strdup(template_str.c_str());
 | 
			
		||||
	log_assert(p);
 | 
			
		||||
	char *res = mkdtemp(p);
 | 
			
		||||
	log_assert(res != NULL);
 | 
			
		||||
	if (!res)
 | 
			
		||||
		log_error("mkdtemp failed for '%s': %s [Error %d]\n",
 | 
			
		||||
			p, strerror(errno), errno);
 | 
			
		||||
	template_str = p;
 | 
			
		||||
	free(p);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue