From 10eb93683603765ab874d5330b83d253f4c3edf1 Mon Sep 17 00:00:00 2001 From: Lassi Kortela Date: Tue, 13 Aug 2019 15:53:37 +0300 Subject: [PATCH] Start file system support for NetBSD --- c/fs_netbsd.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 c/fs_netbsd.c diff --git a/c/fs_netbsd.c b/c/fs_netbsd.c new file mode 100644 index 0000000..de93cfa --- /dev/null +++ b/c/fs_netbsd.c @@ -0,0 +1,13 @@ +#include + +#include + +#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; +}