Start file system support for NetBSD
This commit is contained in:
		
							parent
							
								
									9b737144ea
								
							
						
					
					
						commit
						10eb936836
					
				| 
						 | 
				
			
			@ -0,0 +1,13 @@
 | 
			
		|||
#include <sys/types.h>
 | 
			
		||||
 | 
			
		||||
#include <sys/sysctl.h>
 | 
			
		||||
 | 
			
		||||
#include "fs.h"
 | 
			
		||||
 | 
			
		||||
char *get_exename(char *buf, size_t size)
 | 
			
		||||
{
 | 
			
		||||
    int mib[4] = { CTL_KERN, KERN_PROC_ARGS, -1, KERN_PROC_PATHNAME };
 | 
			
		||||
 | 
			
		||||
    sysctl(mib, 4, buf, &size, 0, 0);
 | 
			
		||||
    return buf;
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
		Reference in New Issue