From 10660ac8ed32a293a0d9944b138016be6cf74728 Mon Sep 17 00:00:00 2001 From: Lassi Kortela Date: Sat, 10 Aug 2019 02:04:11 +0300 Subject: [PATCH] Start fs implementation for DragonFly BSD --- c/fs_dragonfly.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 c/fs_dragonfly.c diff --git a/c/fs_dragonfly.c b/c/fs_dragonfly.c new file mode 100644 index 0000000..91c545e --- /dev/null +++ b/c/fs_dragonfly.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, KERN_PROC_PATHNAME, -1 }; + + sysctl(mib, 4, buf, &size, 0, 0); + return buf; +}