BarryServer : Git

All the code for all my projects
// BarryServer : Git / Nucleus / commit / d3f787c50eda2dadb77ae216aef1f0bd0a686ae3 / vfs / file.c

// Related

Nucleus

Barry More VFS functions and structure d3f787c (3 years, 2 months ago)
diff --git a/vfs/file.c b/vfs/file.c
index 0d0f31d..bca19dc 100644
--- a/vfs/file.c
+++ b/vfs/file.c
@@ -146,6 +146,17 @@ end:
 	return count;
 }
 
+/* I/O Control */
+int
+file_ioctl(File *file, unsigned long request, uintptr_t argp)
+{
+	if (!file->ops)
+		return -EINVAL;
+	if (!file->ops->ioctl)
+		return -ENOTTY;
+	return file->ops->ioctl(file, request, argp);
+}
+
 /* Map a file into memory */
 void
 file_mmap(File *file, void *addr, size_t len, off_t offset)