Something went wrong. Try again.
Cider Isn't Darwin Emulation, Really
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738#include "mkfifo.h"#include "common.h"#include "../base.h"#include "../errno.h"#include <linux-syscalls/linux.h>#include "../bsdthread/per_thread_wd.h"#include "../vchroot_expand.h"#include <lkm/api.h>#include <mach/lkm.h>#include "../../../../../platform-include/sys/errno.h"
#define LINUX_S_IFIFO 0010000
long sys_mkfifo(const char* path, unsigned int mode){ int ret; struct vchroot_expand_args vc;
if (!path) return -EFAULT;
vc.flags = 0; vc.dfd = get_perthread_wd(); strcpy(vc.path, path);
ret = vchroot_expand(&vc); if (ret < 0) return errno_linux_to_bsd(ret);
ret = LINUX_SYSCALL(__NR_mknod, vc.path, mode | LINUX_S_IFIFO, 0);
if (ret < 0) return errno_linux_to_bsd(ret);
return 0;}