/// <summary> /// Manipulates underlying parameters in files /// </summary> /// <param name="fd">The file descriptor</param> /// <param name="request">The request</param> /// <param name="arg">An optional argument</param> /// <returns>The errorcode or return value from IOCtl</returns> public static unsafe int IOCtl(int fd, int request, void *arg) { FileDescriptors descriptors = Tasking.CurrentTask.FileDescriptors; Node node = descriptors.GetNode(fd); if (node == null) { return(-(int)ErrorCode.EBADF); } return(VFS.IOCtl(node, request, arg)); }