Author: hbelusca
Date: Thu Sep 12 00:05:54 2013
New Revision: 60051
URL: 
http://svn.reactos.org/svn/reactos?rev=60051&view=rev
Log:
[NPFS_NEW]
Don't hardcode the first parameter of the bugchecks. Instead, I introduce a NpBugCheck
macro and file identifiers
(their names conform to the existing name convention of the driver) so that, when
bugchecking, we report as the
first parameter of the NPFS_FILE_SYSTEM bugcheck the file ID (in the high word) and the
line (in the low word)
where the bugcheck was emitted.
See the MSDN article "Bug Check 0x25: NPFS_FILE_SYSTEM" -
http://msdn.microsoft.com/en-us/library/windows/hardware/ff557436(v=vs.85).…
for more information.
Inspired from the existing ext2 driver.
Should be done for the other filesystems (FAT, NTFS, CDFS, Redirector, Mailslot, etc...).
Modified:
    trunk/reactos/drivers/filesystems/npfs_new/cleanup.c
    trunk/reactos/drivers/filesystems/npfs_new/close.c
    trunk/reactos/drivers/filesystems/npfs_new/create.c
    trunk/reactos/drivers/filesystems/npfs_new/datasup.c
    trunk/reactos/drivers/filesystems/npfs_new/fileinfo.c
    trunk/reactos/drivers/filesystems/npfs_new/fileobsup.c
    trunk/reactos/drivers/filesystems/npfs_new/flushbuf.c
    trunk/reactos/drivers/filesystems/npfs_new/fsctrl.c
    trunk/reactos/drivers/filesystems/npfs_new/main.c
    trunk/reactos/drivers/filesystems/npfs_new/npfs.h
    trunk/reactos/drivers/filesystems/npfs_new/prefxsup.c
    trunk/reactos/drivers/filesystems/npfs_new/read.c
    trunk/reactos/drivers/filesystems/npfs_new/readsup.c
    trunk/reactos/drivers/filesystems/npfs_new/secursup.c
    trunk/reactos/drivers/filesystems/npfs_new/seinfo.c
    trunk/reactos/drivers/filesystems/npfs_new/statesup.c
    trunk/reactos/drivers/filesystems/npfs_new/strucsup.c
    trunk/reactos/drivers/filesystems/npfs_new/volinfo.c
    trunk/reactos/drivers/filesystems/npfs_new/waitsup.c
    trunk/reactos/drivers/filesystems/npfs_new/write.c
    trunk/reactos/drivers/filesystems/npfs_new/writesup.c
Modified: trunk/reactos/drivers/filesystems/npfs_new/cleanup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs_n…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs_new/cleanup.c        [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs_new/cleanup.c        [iso-8859-1] Thu Sep 12
00:05:54 2013
@@ -9,6 +9,9 @@
 /* INCLUDES *******************************************************************/
 #include "npfs.h"
+
+// File ID number for NPFS bugchecking support
+#define NPFS_BUGCHECK_FILE_ID   (NPFS_BUGCHECK_CLEANUP)
 /* FUNCTIONS ******************************************************************/
Modified: trunk/reactos/drivers/filesystems/npfs_new/close.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs_n…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs_new/close.c  [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs_new/close.c  [iso-8859-1] Thu Sep 12 00:05:54
2013
@@ -9,6 +9,9 @@
 /* INCLUDES *******************************************************************/
 #include "npfs.h"
+
+// File ID number for NPFS bugchecking support
+#define NPFS_BUGCHECK_FILE_ID   (NPFS_BUGCHECK_CLOSE)
 /* FUNCTIONS ******************************************************************/
Modified: trunk/reactos/drivers/filesystems/npfs_new/create.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs_n…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs_new/create.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs_new/create.c [iso-8859-1] Thu Sep 12 00:05:54
2013
@@ -9,6 +9,9 @@
 /* INCLUDES *******************************************************************/
 #include "npfs.h"
+
+// File ID number for NPFS bugchecking support
+#define NPFS_BUGCHECK_FILE_ID   (NPFS_BUGCHECK_CREATE)
 /* FUNCTIONS ******************************************************************/
Modified: trunk/reactos/drivers/filesystems/npfs_new/datasup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs_n…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs_new/datasup.c        [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs_new/datasup.c        [iso-8859-1] Thu Sep 12
00:05:54 2013
@@ -9,6 +9,9 @@
 /* INCLUDES *******************************************************************/
 #include "npfs.h"
+
+// File ID number for NPFS bugchecking support
+#define NPFS_BUGCHECK_FILE_ID   (NPFS_BUGCHECK_DATASUP)
 /* FUNCTIONS ******************************************************************/
Modified: trunk/reactos/drivers/filesystems/npfs_new/fileinfo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs_n…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs_new/fileinfo.c       [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs_new/fileinfo.c       [iso-8859-1] Thu Sep 12
00:05:54 2013
@@ -10,6 +10,9 @@
 #include "npfs.h"
+// File ID number for NPFS bugchecking support
+#define NPFS_BUGCHECK_FILE_ID   (NPFS_BUGCHECK_FILEINFO)
+
 /* FUNCTIONS ******************************************************************/
 NTSTATUS
@@ -42,7 +45,7 @@
     {
         if (NamedPipeEnd != FILE_PIPE_SERVER_END)
         {
-            KeBugCheckEx(NPFS_FILE_SYSTEM, 0xA04EFu, NamedPipeEnd, 0, 0);
+            NpBugCheck(NamedPipeEnd, 0, 0);
         }
         ReadQueue = &Ccb->DataQueue[FILE_PIPE_INBOUND];
         WriteQueue = &Ccb->DataQueue[FILE_PIPE_OUTBOUND];
@@ -234,7 +237,7 @@
     if (*Length < NameLength)
     {
         Status = STATUS_BUFFER_OVERFLOW;
-        NameLength = *Length;
+        NameLength = (USHORT)*Length;
     }
     else
     {
Modified: trunk/reactos/drivers/filesystems/npfs_new/fileobsup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs_n…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs_new/fileobsup.c      [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs_new/fileobsup.c      [iso-8859-1] Thu Sep 12
00:05:54 2013
@@ -9,6 +9,9 @@
 /* INCLUDES *******************************************************************/
 #include "npfs.h"
+
+// File ID number for NPFS bugchecking support
+#define NPFS_BUGCHECK_FILE_ID   (NPFS_BUGCHECK_FILEOBSUP)
 /* FUNCTIONS ******************************************************************/
@@ -46,7 +49,7 @@
                 return NPFS_NTC_CCB;
             default:
-                KeBugCheckEx(NPFS_FILE_SYSTEM, 0xB0108, Node->NodeType, 0, 0);
+                NpBugCheck(Node->NodeType, 0, 0);
                 break;
             }
     }
Modified: trunk/reactos/drivers/filesystems/npfs_new/flushbuf.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs_n…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs_new/flushbuf.c       [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs_new/flushbuf.c       [iso-8859-1] Thu Sep 12
00:05:54 2013
@@ -9,6 +9,9 @@
 /* INCLUDES *******************************************************************/
 #include "npfs.h"
+
+// File ID number for NPFS bugchecking support
+#define NPFS_BUGCHECK_FILE_ID   (NPFS_BUGCHECK_FLUSHBUF)
 /* FUNCTIONS ******************************************************************/
Modified: trunk/reactos/drivers/filesystems/npfs_new/fsctrl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs_n…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs_new/fsctrl.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs_new/fsctrl.c [iso-8859-1] Thu Sep 12 00:05:54
2013
@@ -9,6 +9,9 @@
 /* INCLUDES *******************************************************************/
 #include "npfs.h"
+
+// File ID number for NPFS bugchecking support
+#define NPFS_BUGCHECK_FILE_ID   (NPFS_BUGCHECK_FSCTRL)
 /* GLOBALS ********************************************************************/
@@ -212,7 +215,7 @@
     {
         if (NamedPipeEnd != FILE_PIPE_SERVER_END)
         {
-            KeBugCheckEx(NPFS_FILE_SYSTEM, 0xD02E5, NamedPipeEnd, 0, 0);
+            NpBugCheck(NamedPipeEnd, 0, 0);
         }
         DataQueue = &Ccb->DataQueue[FILE_PIPE_INBOUND];
@@ -357,7 +360,7 @@
     {
         if (NamedPipeEnd != FILE_PIPE_SERVER_END)
         {
-            KeBugCheckEx(NPFS_FILE_SYSTEM, 0xD0538, NamedPipeEnd, 0, 0);
+            NpBugCheck(NamedPipeEnd, 0, 0);
         }
         ReadQueue = &Ccb->DataQueue[FILE_PIPE_INBOUND];
         WriteQueue = &Ccb->DataQueue[FILE_PIPE_OUTBOUND];
Modified: trunk/reactos/drivers/filesystems/npfs_new/main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs_n…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs_new/main.c   [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs_new/main.c   [iso-8859-1] Thu Sep 12 00:05:54
2013
@@ -9,6 +9,9 @@
 /* INCLUDES *******************************************************************/
 #include "npfs.h"
+
+// File ID number for NPFS bugchecking support
+#define NPFS_BUGCHECK_FILE_ID   (NPFS_BUGCHECK_MAIN)
 /* GLOBALS ********************************************************************/
Modified: trunk/reactos/drivers/filesystems/npfs_new/npfs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs_n…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs_new/npfs.h   [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs_new/npfs.h   [iso-8859-1] Thu Sep 12 00:05:54
2013
@@ -1,3 +1,13 @@
+/*
+ * PROJECT:     ReactOS Named Pipe FileSystem
+ * LICENSE:     BSD - See COPYING.ARM in the top level directory
+ * FILE:        drivers/filesystems/npfs/npfs.h
+ * PURPOSE:     Named Pipe FileSystem Header
+ * PROGRAMMERS: ReactOS Portable Systems Group
+ */
+
+/* INCLUDES *******************************************************************/
+
 //
 // System Headers
 //
@@ -15,6 +25,9 @@
 #pragma warning(disable:4214)
 #pragma warning(disable:4100)
 #endif
+
+
+/* TYPEDEFS & DEFINES *********************************************************/
 //
 // Pool Tags for NPFS (from pooltag.txt)
@@ -46,6 +59,51 @@
 #define NPFS_WRITE_BLOCK_TAG    'NpFw'
 //
+// NPFS bugchecking support
+//
+// We define the NpBugCheck macro which triggers a NPFS_FILE_SYSTEM bugcheck
+// containing the source file ID number and the line where it was emitted, as
+// described in the MSDN article "Bug Check 0x25: NPFS_FILE_SYSTEM".
+//
+// The bugcheck emits 4 ULONGs; the first one is made, in its high word, by
+// the current source file ID and in its low word, by the line number; the
+// three other ones are user-defined.
+//
+// In order to avoid redefinition of the same file ID in different source files,
+// we gather all of them here, so that you will have to add (or remove) a new
+// one as soon as you add (or remove) a source file from the NPFS driver code.
+//
+// To use the NpBugCheck macro in a source file, define at its beginning
+// the constant NPFS_BUGCHECK_FILE_ID with one of the following file IDs,
+// then use the bugcheck macro wherever you want.
+//
+#define NPFS_BUGCHECK_CLEANUP   0x0001
+#define NPFS_BUGCHECK_CLOSE     0x0002
+#define NPFS_BUGCHECK_CREATE    0x0003
+#define NPFS_BUGCHECK_DATASUP   0x0004
+#define NPFS_BUGCHECK_FILEINFO  0x0005
+#define NPFS_BUGCHECK_FILEOBSUP 0x0006
+#define NPFS_BUGCHECK_FLUSHBUF  0x0007
+#define NPFS_BUGCHECK_FSCTRL    0x0008
+#define NPFS_BUGCHECK_MAIN      0x0009
+#define NPFS_BUGCHECK_PREFXSUP  0x000a
+#define NPFS_BUGCHECK_READ      0x000b
+#define NPFS_BUGCHECK_READSUP   0x000c
+#define NPFS_BUGCHECK_SECURSUP  0x000d
+#define NPFS_BUGCHECK_SEINFO    0x000e
+#define NPFS_BUGCHECK_STATESUP  0x000f
+#define NPFS_BUGCHECK_STRUCSUP  0x0010
+#define NPFS_BUGCHECK_VOLINFO   0x0011
+#define NPFS_BUGCHECK_WAITSUP   0x0012
+#define NPFS_BUGCHECK_WRITE     0x0013
+#define NPFS_BUGCHECK_WRITESUP  0x0014
+
+#define NpBugCheck(p1, p2, p3)                              \
+    KeBugCheckEx(NPFS_FILE_SYSTEM,                          \
+                 (NPFS_BUGCHECK_FILE_ID << 16) | __LINE__,  \
+                 (p1), (p2), (p3))
+
+//
 // Node Type Codes for NPFS
 //
 #define NPFS_NTC_VCB            1
@@ -263,6 +321,9 @@
 extern PNP_VCB NpVcb;
+
+/* FUNCTIONS ******************************************************************/
+
 //
 // Functions to lock/unlock the global VCB lock
 //
@@ -600,3 +661,4 @@
 NpFsdQueryVolumeInformation(IN PDEVICE_OBJECT DeviceObject,
                             IN PIRP Irp);
+/* EOF */
Modified: trunk/reactos/drivers/filesystems/npfs_new/prefxsup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs_n…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs_new/prefxsup.c       [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs_new/prefxsup.c       [iso-8859-1] Thu Sep 12
00:05:54 2013
@@ -9,6 +9,9 @@
 /* INCLUDES *******************************************************************/
 #include "npfs.h"
+
+// File ID number for NPFS bugchecking support
+#define NPFS_BUGCHECK_FILE_ID   (NPFS_BUGCHECK_PREFXSUP)
 /* FUNCTIONS ******************************************************************/
@@ -25,7 +28,7 @@
     Entry = RtlFindUnicodePrefix(&NpVcb->PrefixTable,
                                  Name,
                                  CaseInsensitiveIndex);
-    if (!Entry) KeBugCheckEx(NPFS_FILE_SYSTEM, 0x100065u, 0, 0, 0);
+    if (!Entry) NpBugCheck(0, 0, 0);
     Fcb = CONTAINING_RECORD(Entry, NP_FCB, PrefixTableEntry);
Modified: trunk/reactos/drivers/filesystems/npfs_new/read.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs_n…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs_new/read.c   [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs_new/read.c   [iso-8859-1] Thu Sep 12 00:05:54
2013
@@ -9,6 +9,9 @@
 /* INCLUDES *******************************************************************/
 #include "npfs.h"
+
+// File ID number for NPFS bugchecking support
+#define NPFS_BUGCHECK_FILE_ID   (NPFS_BUGCHECK_READ)
 /* GLOBALS ********************************************************************/
Modified: trunk/reactos/drivers/filesystems/npfs_new/readsup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs_n…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs_new/readsup.c        [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs_new/readsup.c        [iso-8859-1] Thu Sep 12
00:05:54 2013
@@ -9,6 +9,9 @@
 /* INCLUDES *******************************************************************/
 #include "npfs.h"
+
+// File ID number for NPFS bugchecking support
+#define NPFS_BUGCHECK_FILE_ID   (NPFS_BUGCHECK_READSUP)
 /* FUNCTIONS ******************************************************************/
Modified: trunk/reactos/drivers/filesystems/npfs_new/secursup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs_n…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs_new/secursup.c       [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs_new/secursup.c       [iso-8859-1] Thu Sep 12
00:05:54 2013
@@ -9,6 +9,9 @@
 /* INCLUDES *******************************************************************/
 #include "npfs.h"
+
+// File ID number for NPFS bugchecking support
+#define NPFS_BUGCHECK_FILE_ID   (NPFS_BUGCHECK_SECURSUP)
 /* FUNCTIONS ******************************************************************/
Modified: trunk/reactos/drivers/filesystems/npfs_new/seinfo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs_n…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs_new/seinfo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs_new/seinfo.c [iso-8859-1] Thu Sep 12 00:05:54
2013
@@ -9,6 +9,9 @@
 /* INCLUDES *******************************************************************/
 #include "npfs.h"
+
+// File ID number for NPFS bugchecking support
+#define NPFS_BUGCHECK_FILE_ID   (NPFS_BUGCHECK_SEINFO)
 /* FUNCTIONS ******************************************************************/
Modified: trunk/reactos/drivers/filesystems/npfs_new/statesup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs_n…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs_new/statesup.c       [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs_new/statesup.c       [iso-8859-1] Thu Sep 12
00:05:54 2013
@@ -9,6 +9,9 @@
 /* INCLUDES *******************************************************************/
 #include "npfs.h"
+
+// File ID number for NPFS bugchecking support
+#define NPFS_BUGCHECK_FILE_ID   (NPFS_BUGCHECK_STATESUP)
 /* FUNCTIONS ******************************************************************/
@@ -170,7 +173,7 @@
             break;
         default:
-            KeBugCheckEx(NPFS_FILE_SYSTEM, 0x1603DD, Ccb->NamedPipeState, 0, 0);
+            NpBugCheck(Ccb->NamedPipeState, 0, 0);
             break;
     }
@@ -228,7 +231,7 @@
             break;
         default:
-            KeBugCheckEx(NPFS_FILE_SYSTEM, 0x160133, Ccb->NamedPipeState, 0, 0);
+            NpBugCheck(Ccb->NamedPipeState, 0, 0);
             break;
     }
@@ -377,7 +380,7 @@
             break;
         default:
-            KeBugCheckEx(NPFS_FILE_SYSTEM, 0x1602F9, Ccb->NamedPipeState, 0, 0);
+            NpBugCheck(Ccb->NamedPipeState, 0, 0);
             break;
     }
     return STATUS_SUCCESS;
Modified: trunk/reactos/drivers/filesystems/npfs_new/strucsup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs_n…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs_new/strucsup.c       [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs_new/strucsup.c       [iso-8859-1] Thu Sep 12
00:05:54 2013
@@ -10,6 +10,9 @@
 #include "npfs.h"
+// File ID number for NPFS bugchecking support
+#define NPFS_BUGCHECK_FILE_ID   (NPFS_BUGCHECK_STRUCSUP)
+
 /* GLOBALS ********************************************************************/
 #define UNIMPLEMENTED
@@ -67,7 +70,7 @@
     PAGED_CODE();
     Dcb = Fcb->ParentDcb;
-    if (Fcb->CurrentInstances) KeBugCheckEx(NPFS_FILE_SYSTEM, 0x17025F, 0, 0, 0);
+    if (Fcb->CurrentInstances) NpBugCheck(0, 0, 0);
     NpCancelWaiter(&NpVcb->WaitQueue,
                    &Fcb->FullName,
@@ -169,7 +172,7 @@
     if (NpVcb->RootDcb)
     {
-        KeBugCheckEx(NPFS_FILE_SYSTEM, 0x1700F3, 0, 0, 0);
+        NpBugCheck(0, 0, 0);
     }
     NpVcb->RootDcb = ExAllocatePoolWithTag(PagedPool, sizeof(*Dcb), NPFS_DCB_TAG);
@@ -199,7 +202,7 @@
                                 &Dcb->FullName,
                                 &Dcb->PrefixTableEntry))
     {
-        KeBugCheckEx(NPFS_FILE_SYSTEM, 0x170128, 0, 0, 0);
+        NpBugCheck(0, 0, 0);
     }
     return STATUS_SUCCESS;
@@ -284,7 +287,7 @@
                                 &Fcb->FullName,
                                 &Fcb->PrefixTableEntry))
     {
-        KeBugCheckEx(NPFS_FILE_SYSTEM, 0x170222, 0, 0, 0);
+        NpBugCheck(0, 0, 0);
     }
     Fcb->NamedPipeConfiguration = NamedPipeConfiguration;
Modified: trunk/reactos/drivers/filesystems/npfs_new/volinfo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs_n…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs_new/volinfo.c        [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs_new/volinfo.c        [iso-8859-1] Thu Sep 12
00:05:54 2013
@@ -10,6 +10,9 @@
 #include "npfs.h"
+// File ID number for NPFS bugchecking support
+#define NPFS_BUGCHECK_FILE_ID   (NPFS_BUGCHECK_VOLINFO)
+
 /* FUNCTIONS ******************************************************************/
 NTSTATUS
@@ -33,7 +36,7 @@
     if (NameLength < 18)
     {
-        NameLength = *Length;
+        NameLength = (USHORT)*Length;
         Status = STATUS_BUFFER_OVERFLOW;
     }
     else
@@ -96,7 +99,7 @@
     NTSTATUS Status;
     USHORT NameLength;
-    NameLength = *Length - 12;
+    NameLength = (USHORT)(*Length - 12);
     if (NameLength < 8)
     {
         *Length = 0;
Modified: trunk/reactos/drivers/filesystems/npfs_new/waitsup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs_n…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs_new/waitsup.c        [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs_new/waitsup.c        [iso-8859-1] Thu Sep 12
00:05:54 2013
@@ -10,6 +10,9 @@
 #include "npfs.h"
+// File ID number for NPFS bugchecking support
+#define NPFS_BUGCHECK_FILE_ID   (NPFS_BUGCHECK_WAITSUP)
+
 /* FUNCTIONS ******************************************************************/
 VOID
Modified: trunk/reactos/drivers/filesystems/npfs_new/write.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs_n…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs_new/write.c  [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs_new/write.c  [iso-8859-1] Thu Sep 12 00:05:54
2013
@@ -9,6 +9,9 @@
 /* INCLUDES *******************************************************************/
 #include "npfs.h"
+
+// File ID number for NPFS bugchecking support
+#define NPFS_BUGCHECK_FILE_ID   (NPFS_BUGCHECK_WRITE)
 /* GLOBALS ********************************************************************/
Modified: trunk/reactos/drivers/filesystems/npfs_new/writesup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/npfs_n…
==============================================================================
--- trunk/reactos/drivers/filesystems/npfs_new/writesup.c       [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/npfs_new/writesup.c       [iso-8859-1] Thu Sep 12
00:05:54 2013
@@ -9,6 +9,9 @@
 /* INCLUDES *******************************************************************/
 #include "npfs.h"
+
+// File ID number for NPFS bugchecking support
+#define NPFS_BUGCHECK_FILE_ID   (NPFS_BUGCHECK_WRITESUP)
 /* FUNCTIONS ******************************************************************/