--- trunk/reactos/drivers/fs/cdfs/cdfs.h 2006-01-07 05:47:21 UTC (rev 20649)
+++ trunk/reactos/drivers/fs/cdfs/cdfs.h 2006-01-07 05:59:22 UTC (rev 20650)
@@ -1,8 +1,8 @@
#ifndef CDFS_H
#define CDFS_H
+#include <ntifs.h>
#include <ntddk.h>
-#include <ntifs.h>
#include <ntddcdrm.h>
#include <ccros.h>
@@ -21,6 +21,7 @@
#define VOLUME_PARTITION_DESCRIPTOR_TYPE 3
#define VOLUME_DESCRIPTOR_SET_TERMINATOR 255
+#include <pshpack1.h>
struct _DIR_RECORD
{
UCHAR RecordLength; // 1
@@ -42,7 +43,8 @@
ULONG VolumeSequenceNumber; // 29-32
UCHAR FileIdLength; // 33
UCHAR FileId[1]; // 34
-} __attribute__((packed));
+};
+#include <poppack.h>
typedef struct _DIR_RECORD DIR_RECORD, *PDIR_RECORD;
@@ -54,12 +56,13 @@
/* Volume Descriptor header*/
+#include <pshpack1.h>
struct _VD_HEADER
{
UCHAR VdType; // 1
UCHAR StandardId[5]; // 2-6
UCHAR VdVersion; // 7
-} __attribute__((packed));
+};
typedef struct _VD_HEADER VD_HEADER, *PVD_HEADER;
@@ -93,8 +96,7 @@
/* more data ... */
-} __attribute__((packed));
-
+};
typedef struct _PVD PVD, *PPVD;
@@ -125,7 +127,8 @@
UCHAR PublisherIdentifier[128]; // 319-446
// more data ...
-} __attribute__((packed));
+};
+#include <poppack.h>
typedef struct _SVD SVD, *PSVD;
@@ -171,6 +174,8 @@
#define FCB_IS_VOLUME_STREAM 0x0002
#define FCB_IS_VOLUME 0x0004
+#define MAX_PATH 260
+
typedef struct _FCB
{
FSRTL_COMMON_FCB_HEADER RFCB;
--- trunk/reactos/drivers/fs/cdfs/dirctl.c 2006-01-07 05:47:21 UTC (rev 20649)
+++ trunk/reactos/drivers/fs/cdfs/dirctl.c 2006-01-07 05:59:22 UTC (rev 20650)
@@ -381,12 +381,12 @@
DPRINT("CdfsGetNameInformation() called\n");
Length = wcslen(Fcb->ObjectName) * sizeof(WCHAR);
- if ((sizeof (FILE_BOTH_DIRECTORY_INFORMATION) + Length) > BufferLength)
+ if ((sizeof (FILE_BOTH_DIR_INFORMATION) + Length) > BufferLength)
return(STATUS_BUFFER_OVERFLOW);
Info->FileNameLength = Length;
Info->NextEntryOffset =
- ROUND_UP(sizeof(FILE_BOTH_DIRECTORY_INFORMATION) + Length, 4);
+ ROUND_UP(sizeof(FILE_BOTH_DIR_INFORMATION) + Length, 4);
memcpy(Info->FileName, Fcb->ObjectName, Length);
return(STATUS_SUCCESS);
@@ -404,12 +404,12 @@
DPRINT("CdfsGetDirectoryInformation() called\n");
Length = wcslen(Fcb->ObjectName) * sizeof(WCHAR);
- if ((sizeof (FILE_BOTH_DIRECTORY_INFORMATION) + Length) > BufferLength)
+ if ((sizeof (FILE_BOTH_DIR_INFORMATION) + Length) > BufferLength)
return(STATUS_BUFFER_OVERFLOW);
Info->FileNameLength = Length;
Info->NextEntryOffset =
- ROUND_UP(sizeof(FILE_BOTH_DIRECTORY_INFORMATION) + Length, 4);
+ ROUND_UP(sizeof(FILE_BOTH_DIR_INFORMATION) + Length, 4);
memcpy(Info->FileName, Fcb->ObjectName, Length);
/* Convert file times */
@@ -447,7 +447,7 @@
static NTSTATUS
CdfsGetFullDirectoryInformation(PFCB Fcb,
PDEVICE_EXTENSION DeviceExt,
- PFILE_FULL_DIRECTORY_INFORMATION Info,
+ PFILE_FULL_DIR_INFORMATION Info,
ULONG BufferLength)
{
ULONG Length;
@@ -455,12 +455,12 @@
DPRINT("CdfsGetFullDirectoryInformation() called\n");
Length = wcslen(Fcb->ObjectName) * sizeof(WCHAR);
- if ((sizeof (FILE_BOTH_DIRECTORY_INFORMATION) + Length) > BufferLength)
+ if ((sizeof (FILE_BOTH_DIR_INFORMATION) + Length) > BufferLength)
return(STATUS_BUFFER_OVERFLOW);
Info->FileNameLength = Length;
Info->NextEntryOffset =
- ROUND_UP(sizeof(FILE_BOTH_DIRECTORY_INFORMATION) + Length, 4);
+ ROUND_UP(sizeof(FILE_BOTH_DIR_INFORMATION) + Length, 4);
memcpy(Info->FileName, Fcb->ObjectName, Length);
/* Convert file times */
@@ -500,7 +500,7 @@
static NTSTATUS
CdfsGetBothDirectoryInformation(PFCB Fcb,
PDEVICE_EXTENSION DeviceExt,
- PFILE_BOTH_DIRECTORY_INFORMATION Info,
+ PFILE_BOTH_DIR_INFORMATION Info,
ULONG BufferLength)
{
ULONG Length;
@@ -508,12 +508,12 @@
DPRINT("CdfsGetBothDirectoryInformation() called\n");
Length = wcslen(Fcb->ObjectName) * sizeof(WCHAR);
- if ((sizeof (FILE_BOTH_DIRECTORY_INFORMATION) + Length) > BufferLength)
+ if ((sizeof (FILE_BOTH_DIR_INFORMATION) + Length) > BufferLength)
return(STATUS_BUFFER_OVERFLOW);
Info->FileNameLength = Length;
Info->NextEntryOffset =
- ROUND_UP(sizeof(FILE_BOTH_DIRECTORY_INFORMATION) + Length, 4);
+ ROUND_UP(sizeof(FILE_BOTH_DIR_INFORMATION) + Length, 4);
memcpy(Info->FileName, Fcb->ObjectName, Length);
/* Convert file times */
@@ -682,14 +682,14 @@
case FileFullDirectoryInformation:
Status = CdfsGetFullDirectoryInformation(&TempFcb,
DeviceExtension,
- (PFILE_FULL_DIRECTORY_INFORMATION)Buffer,
+ (PFILE_FULL_DIR_INFORMATION)Buffer,
BufferLength);
break;
case FileBothDirectoryInformation:
Status = CdfsGetBothDirectoryInformation(&TempFcb,
DeviceExtension,
- (PFILE_BOTH_DIRECTORY_INFORMATION)Buffer,
+ (PFILE_BOTH_DIR_INFORMATION)Buffer,
BufferLength);
break;