- Begin attempt at usage of the OPEN_PACKET for I/O Create operations. Currently...
[reactos.git] / reactos / ntoskrnl / include / internal / io_x.h
index 40f4c49..51ce7f9 100644 (file)
@@ -76,3 +76,19 @@ IopUpdateOperationCount(IN IOP_TRANSFER_TYPE Type)
     }\r
 }\r
 \r
+BOOLEAN\r
+static __inline\r
+IopValidateOpenPacket(IN POPEN_PACKET OpenPacket)\r
+{\r
+    /* Validate the packet */\r
+    if (!(OpenPacket) ||\r
+        (OpenPacket->Type != IO_TYPE_OPEN_PACKET) ||\r
+        (OpenPacket->Size != sizeof(OPEN_PACKET)))\r
+    {\r
+        /* Fail */\r
+        return FALSE;\r
+    }\r
+\r
+    /* Good packet */\r
+    return TRUE;\r
+}\r