On FAT16 partitions smaller than 128MB, the cluster size is 2048, which is
[reactos.git] / reactos / subsys / smss / initobdir.c
index 0a1c6ad..df65eca 100644 (file)
@@ -1,91 +1,89 @@
-/* $Id: init.c 13449 2005-02-06 21:55:07Z ea $\r
- *\r
- * initobdir.c - Session Manager object directories\r
- * \r
- * ReactOS Operating System\r
- * \r
- * --------------------------------------------------------------------\r
- *\r
- * This software is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU General Public License as\r
- * published by the Free Software Foundation; either version 2 of the\r
- * License, or (at your option) any later version.\r
- *\r
- * This software is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
- * General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU General Public License\r
- * along with this software; see the file COPYING.LIB. If not, write\r
- * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge,\r
- * MA 02139, USA.  \r
- *\r
- * --------------------------------------------------------------------\r
- */\r
-#include "smss.h"\r
-\r
-#define NDEBUG\r
-#include <debug.h>\r
-\r
-static NTSTATUS STDCALL\r
-SmpObjectDirectoryQueryRoutine(PWSTR ValueName,\r
-                             ULONG ValueType,\r
-                             PVOID ValueData,\r
-                             ULONG ValueLength,\r
-                             PVOID Context,\r
-                             PVOID EntryContext)\r
-{\r
-  OBJECT_ATTRIBUTES ObjectAttributes;\r
-  UNICODE_STRING UnicodeString;\r
-  HANDLE WindowsDirectory;\r
-  NTSTATUS Status = STATUS_SUCCESS;\r
-\r
-#ifndef NDEBUG\r
-  DbgPrint("ValueName '%S'  Type %lu  Length %lu\n", ValueName, ValueType, ValueLength);\r
-  DbgPrint("ValueData '%S'\n", (PWSTR)ValueData);\r
-#endif\r
-  if (ValueType != REG_SZ)\r
-    {\r
-      return(STATUS_SUCCESS);\r
-    }\r
-\r
-  RtlInitUnicodeString(&UnicodeString,\r
-                      (PWSTR)ValueData);\r
-\r
-  InitializeObjectAttributes(&ObjectAttributes,\r
-                            &UnicodeString,\r
-                            0,\r
-                            NULL,\r
-                            NULL);\r
-\r
-  Status = ZwCreateDirectoryObject(&WindowsDirectory,\r
-                                  0,\r
-                                  &ObjectAttributes);\r
-\r
-  return(Status);\r
-}\r
-\r
-\r
-NTSTATUS\r
-SmCreateObjectDirectories(VOID)\r
-{\r
-  RTL_QUERY_REGISTRY_TABLE QueryTable[2];\r
-  NTSTATUS Status;\r
-\r
-  RtlZeroMemory(&QueryTable,\r
-               sizeof(QueryTable));\r
-\r
-  QueryTable[0].Name = L"ObjectDirectories";\r
-  QueryTable[0].QueryRoutine = SmpObjectDirectoryQueryRoutine;\r
-\r
-  Status = RtlQueryRegistryValues(RTL_REGISTRY_CONTROL,\r
-                                 SM_REGISTRY_ROOT_NAME,\r
-                                 QueryTable,\r
-                                 NULL,\r
-                                 NULL);\r
-\r
-  return(Status);\r
-}\r
-\r
-/* EOF */\r
+/* $Id$
+ *
+ * initobdir.c - Session Manager object directories
+ * 
+ * ReactOS Operating System
+ * 
+ * --------------------------------------------------------------------
+ *
+ * This software is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING.LIB. If not, write
+ * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
+ * MA 02139, USA.  
+ *
+ * --------------------------------------------------------------------
+ */
+#include "smss.h"
+
+#define NDEBUG
+#include <debug.h>
+
+static NTSTATUS STDCALL
+SmpObjectDirectoryQueryRoutine(PWSTR ValueName,
+                             ULONG ValueType,
+                             PVOID ValueData,
+                             ULONG ValueLength,
+                             PVOID Context,
+                             PVOID EntryContext)
+{
+  OBJECT_ATTRIBUTES ObjectAttributes;
+  UNICODE_STRING UnicodeString;
+  HANDLE WindowsDirectory;
+  NTSTATUS Status = STATUS_SUCCESS;
+
+  DPRINT("ValueName '%S'  Type %lu  Length %lu\n", ValueName, ValueType, ValueLength);
+  DPRINT("ValueData '%S'\n", (PWSTR)ValueData);
+  if (ValueType != REG_SZ)
+    {
+      return(STATUS_SUCCESS);
+    }
+
+  RtlInitUnicodeString(&UnicodeString,
+                      (PWSTR)ValueData);
+
+  InitializeObjectAttributes(&ObjectAttributes,
+                            &UnicodeString,
+                            0,
+                            NULL,
+                            NULL);
+
+  Status = ZwCreateDirectoryObject(&WindowsDirectory,
+                                  0,
+                                  &ObjectAttributes);
+
+  return(Status);
+}
+
+
+NTSTATUS
+SmCreateObjectDirectories(VOID)
+{
+  RTL_QUERY_REGISTRY_TABLE QueryTable[2];
+  NTSTATUS Status;
+
+  RtlZeroMemory(&QueryTable,
+               sizeof(QueryTable));
+
+  QueryTable[0].Name = L"ObjectDirectories";
+  QueryTable[0].QueryRoutine = SmpObjectDirectoryQueryRoutine;
+
+  Status = RtlQueryRegistryValues(RTL_REGISTRY_CONTROL,
+                                 SM_REGISTRY_ROOT_NAME,
+                                 QueryTable,
+                                 NULL,
+                                 NULL);
+
+  return(Status);
+}
+
+/* EOF */