ReactOS 0.4.16-dev-290-g89a3b8f
volinfo.c File Reference
#include "npfs.h"
Include dependency graph for volinfo.c:

Go to the source code of this file.

Macros

#define NPFS_BUGCHECK_FILE_ID   (NPFS_BUGCHECK_VOLINFO)
 

Functions

NTSTATUS NTAPI NpQueryFsVolumeInfo (IN PVOID Buffer, IN OUT PULONG Length)
 
NTSTATUS NTAPI NpQueryFsSizeInfo (IN PVOID Buffer, IN OUT PULONG Length)
 
NTSTATUS NTAPI NpQueryFsDeviceInfo (IN PVOID Buffer, IN OUT PULONG Length)
 
NTSTATUS NTAPI NpQueryFsAttributeInfo (IN PVOID Buffer, IN OUT PULONG Length)
 
NTSTATUS NTAPI NpQueryFsFullSizeInfo (IN PVOID Buffer, IN OUT PULONG Length)
 
NTSTATUS NTAPI NpCommonQueryVolumeInformation (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 
NTSTATUS NTAPI NpFsdQueryVolumeInformation (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 

Macro Definition Documentation

◆ NPFS_BUGCHECK_FILE_ID

#define NPFS_BUGCHECK_FILE_ID   (NPFS_BUGCHECK_VOLINFO)

Definition at line 14 of file volinfo.c.

Function Documentation

◆ NpCommonQueryVolumeInformation()

NTSTATUS NTAPI NpCommonQueryVolumeInformation ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp 
)

Definition at line 134 of file volinfo.c.

136{
137 PIO_STACK_LOCATION IoStack;
138 FS_INFORMATION_CLASS InfoClass;
142 PAGED_CODE();
143 TRACE("Entered\n");
144
146 Buffer = Irp->AssociatedIrp.SystemBuffer;
147 Length = IoStack->Parameters.QueryVolume.Length;
148 InfoClass = IoStack->Parameters.QueryVolume.FsInformationClass;
149
151
152 switch (InfoClass)
153 {
156 break;
159 break;
162 break;
165 break;
168 break;
169 default:
171 break;
172 }
173
174 Irp->IoStatus.Information = IoStack->Parameters.QueryVolume.Length - Length;
175 TRACE("Leaving, Status = %lx\n", Status);
176 return Status;
177}
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
#define PAGED_CODE()
LONG NTSTATUS
Definition: precomp.h:26
Definition: bufpool.h:45
_In_ PIRP Irp
Definition: csq.h:116
#define STATUS_NOT_SUPPORTED
Definition: d3dkmdt.h:48
@ FileFsDeviceInformation
Definition: from_kernel.h:222
@ FileFsAttributeInformation
Definition: from_kernel.h:223
@ FileFsVolumeInformation
Definition: from_kernel.h:219
@ FileFsSizeInformation
Definition: from_kernel.h:221
enum _FSINFOCLASS FS_INFORMATION_CLASS
Status
Definition: gdiplustypes.h:25
NTSTATUS NTAPI NpQueryFsAttributeInfo(IN PVOID Buffer, IN OUT PULONG Length)
Definition: volinfo.c:86
NTSTATUS NTAPI NpQueryFsSizeInfo(IN PVOID Buffer, IN OUT PULONG Length)
Definition: volinfo.c:54
NTSTATUS NTAPI NpQueryFsDeviceInfo(IN PVOID Buffer, IN OUT PULONG Length)
Definition: volinfo.c:71
NTSTATUS NTAPI NpQueryFsFullSizeInfo(IN PVOID Buffer, IN OUT PULONG Length)
Definition: volinfo.c:118
NTSTATUS NTAPI NpQueryFsVolumeInfo(IN PVOID Buffer, IN OUT PULONG Length)
Definition: volinfo.c:20
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
#define FileFsFullSizeInformation
Definition: ntifs_ex.h:389
#define TRACE(s)
Definition: solgame.cpp:4
struct _IO_STACK_LOCATION::@3978::@3991 QueryVolume
union _IO_STACK_LOCATION::@1579 Parameters
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
uint32_t ULONG
Definition: typedefs.h:59

Referenced by NpFsdQueryVolumeInformation().

◆ NpFsdQueryVolumeInformation()

NTSTATUS NTAPI NpFsdQueryVolumeInformation ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp 
)

Definition at line 181 of file volinfo.c.

183{
185 PAGED_CODE();
186 TRACE("Entered\n");
187
190
192
193 NpReleaseVcb();
195
196 if (Status != STATUS_PENDING)
197 {
198 Irp->IoStatus.Status = Status;
200 }
201
202 TRACE("Leaving, Status = %lx\n", Status);
203 return Status;
204}
#define STATUS_PENDING
Definition: d3dkmdt.h:43
FORCEINLINE VOID NpReleaseVcb(VOID)
Definition: npfs.h:344
FORCEINLINE VOID NpAcquireSharedVcb(VOID)
Definition: npfs.h:328
#define FsRtlEnterFileSystem
#define FsRtlExitFileSystem
NTSTATUS NTAPI NpCommonQueryVolumeInformation(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: volinfo.c:134
#define IoCompleteRequest
Definition: irp.c:1240
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
#define IO_NAMED_PIPE_INCREMENT
Definition: iotypes.h:604

Referenced by DriverEntry().

◆ NpQueryFsAttributeInfo()

NTSTATUS NTAPI NpQueryFsAttributeInfo ( IN PVOID  Buffer,
IN OUT PULONG  Length 
)

Definition at line 86 of file volinfo.c.

88{
91 USHORT NameLength;
92 TRACE("Entered\n");
93
94 NameLength = (USHORT)(*Length - 12);
95 if (NameLength < 8)
96 {
97 *Length = 0;
99 }
100 else
101 {
102 *Length -= 20;
103 NameLength = 8;
105 }
106
107 InfoBuffer->MaximumComponentNameLength = 0xFFFFFFFF;
108 InfoBuffer->FileSystemNameLength = 8;
110 RtlCopyMemory(InfoBuffer->FileSystemName, L"NPFS", NameLength);
111
112 TRACE("Leaving, Status = %lx\n", Status);
113 return Status;
114}
#define FILE_CASE_PRESERVED_NAMES
Definition: from_kernel.h:234
#define L(x)
Definition: ntvdm.h:50
unsigned short USHORT
Definition: pedump.c:61
#define STATUS_SUCCESS
Definition: shellext.h:65
#define STATUS_BUFFER_OVERFLOW
Definition: shellext.h:66
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263

Referenced by NpCommonQueryVolumeInformation().

◆ NpQueryFsDeviceInfo()

NTSTATUS NTAPI NpQueryFsDeviceInfo ( IN PVOID  Buffer,
IN OUT PULONG  Length 
)

Definition at line 71 of file volinfo.c.

73{
75 TRACE("Entered\n");
76
78 *Length -= sizeof(*InfoBuffer);
79
80 TRACE("Leaving, Status = STATUS_SUCCESS\n");
81 return STATUS_SUCCESS;
82}
#define FILE_DEVICE_NAMED_PIPE
Definition: winioctl.h:62

Referenced by NpCommonQueryVolumeInformation().

◆ NpQueryFsFullSizeInfo()

NTSTATUS NTAPI NpQueryFsFullSizeInfo ( IN PVOID  Buffer,
IN OUT PULONG  Length 
)

Definition at line 118 of file volinfo.c.

120{
122 TRACE("Entered\n");
123
124 *Length -= sizeof(*InfoBuffer);
125
126 RtlZeroMemory(InfoBuffer, sizeof(*InfoBuffer));
127
128 TRACE("Leaving, Status = STATUS_SUCCESS\n");
129 return STATUS_SUCCESS;
130}

Referenced by NpCommonQueryVolumeInformation().

◆ NpQueryFsSizeInfo()

NTSTATUS NTAPI NpQueryFsSizeInfo ( IN PVOID  Buffer,
IN OUT PULONG  Length 
)

Definition at line 54 of file volinfo.c.

56{
58 TRACE("Entered\n");
59
60 *Length -= sizeof(*InfoBuffer);
61
62 InfoBuffer->SectorsPerAllocationUnit = 1;
63 InfoBuffer->BytesPerSector = 1;
64
65 TRACE("Leaving, Status = STATUS_SUCCESS\n");
66 return STATUS_SUCCESS;
67}

Referenced by NpCommonQueryVolumeInformation().

◆ NpQueryFsVolumeInfo()

NTSTATUS NTAPI NpQueryFsVolumeInfo ( IN PVOID  Buffer,
IN OUT PULONG  Length 
)

Definition at line 20 of file volinfo.c.

22{
25 USHORT NameLength;
26 TRACE("Entered\n");
27
29
30 InfoBuffer->SupportsObjects = 0;
31
32 NameLength = 18;
33 InfoBuffer->VolumeLabelLength = 18;
34
35 if (*Length < 18)
36 {
37 NameLength = (USHORT)*Length;
39 }
40 else
41 {
43 }
44
45 RtlCopyMemory(InfoBuffer->VolumeLabel, L"NamedPipe", NameLength);
46 *Length -= NameLength;
47
48 TRACE("Leaving, Status = %lx\n", Status);
49 return Status;
50}
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255

Referenced by NpCommonQueryVolumeInformation().