ReactOS 0.4.15-dev-5853-gcb454ef
devctl.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYRIGHT.TXT
3 * PROJECT: Ext2 File System Driver for WinNT/2K/XP
4 * FILE: devctl.c
5 * PROGRAMMER: Matt Wu <mattwu@163.com>
6 * HOMEPAGE: http://www.ext2fsd.com
7 * UPDATE HISTORY:
8 */
9
10/* INCLUDES *****************************************************************/
11
12#include "ext2fs.h"
13
14/* GLOBALS ***************************************************************/
15
17
18/* DEFINITIONS *************************************************************/
19
23 IN PIRP Irp,
25
26
27#ifdef ALLOC_PRAGMA
28#pragma alloc_text(PAGE, Ext2DeviceControl)
29#pragma alloc_text(PAGE, Ext2DeviceControlNormal)
30#pragma alloc_text(PAGE, Ext2ProcessVolumeProperty)
31#pragma alloc_text(PAGE, Ext2ProcessUserProperty)
32#pragma alloc_text(PAGE, Ext2ProcessGlobalProperty)
33#pragma alloc_text(PAGE, Ex2ProcessUserPerfStat)
34#pragma alloc_text(PAGE, Ex2ProcessMountPoint)
35#if EXT2_UNLOAD
36#pragma alloc_text(PAGE, Ext2PrepareToUnload)
37#endif
38#endif
39
40
44 IN PIRP Irp,
46)
47{
48 if (Irp->PendingReturned) {
50 }
51
52 return STATUS_SUCCESS;
53}
54
55
58{
62
64
65 PIRP Irp;
67 PIO_STACK_LOCATION NextIrpSp;
68
70
71 _SEH2_TRY {
72
73 ASSERT(IrpContext != NULL);
74
75 ASSERT((IrpContext->Identifier.Type == EXT2ICX) &&
76 (IrpContext->Identifier.Size == sizeof(EXT2_IRP_CONTEXT)));
77
79
80 DeviceObject = IrpContext->DeviceObject;
81
85 }
86
87 Irp = IrpContext->Irp;
89
90 Vcb = (PEXT2_VCB) IrpSp->FileObject->FsContext;
91
92 if (!((Vcb) && (Vcb->Identifier.Type == EXT2VCB) &&
93 (Vcb->Identifier.Size == sizeof(EXT2_VCB)))) {
96 }
97
98 TargetDeviceObject = Vcb->TargetDeviceObject;
99
100 //
101 // Pass on the IOCTL to the driver below
102 //
103
105
106 NextIrpSp = IoGetNextIrpStackLocation( Irp );
107 *NextIrpSp = *IrpSp;
108
110 Irp,
112 NULL,
113 FALSE,
114 TRUE,
115 TRUE );
116
118
119 } _SEH2_FINALLY {
120
121 if (!IrpContext->ExceptionInProgress) {
122 if (IrpContext) {
123 if (!CompleteRequest) {
124 IrpContext->Irp = NULL;
125 }
126
127 Ext2CompleteIrpContext(IrpContext, Status);
128 }
129 }
130 } _SEH2_END;
131
132 return Status;
133}
134
135
136#if EXT2_UNLOAD
137
140{
143 BOOLEAN GlobalDataResourceAcquired = FALSE;
144
145 _SEH2_TRY {
146
147 ASSERT(IrpContext != NULL);
148
149 ASSERT((IrpContext->Identifier.Type == EXT2ICX) &&
150 (IrpContext->Identifier.Size == sizeof(EXT2_IRP_CONTEXT)));
151
152 DeviceObject = IrpContext->DeviceObject;
153
157 }
158
161 TRUE );
162
163 GlobalDataResourceAcquired = TRUE;
164
166 DEBUG(DL_ERR, ( "Ext2PrepareUnload: Already ready to unload.\n"));
167
169
171 }
172
173 {
175 PLIST_ENTRY ListEntry;
176
177 ListEntry = Ext2Global->VcbList.Flink;
178
179 while (ListEntry != &(Ext2Global->VcbList)) {
180
181 Vcb = CONTAINING_RECORD(ListEntry, EXT2_VCB, Next);
182 ListEntry = ListEntry->Flink;
183
184 if (Vcb && (!Vcb->ReferenceCount) &&
188
190 }
191 }
192 }
193
194 if (!IsListEmpty(&(Ext2Global->VcbList))) {
195
196 DEBUG(DL_ERR, ( "Ext2PrepareUnload: Mounted volumes exists.\n"));
197
199
201 }
202
208
209 DEBUG(DL_INF, ( "Ext2PrepareToUnload: Driver is ready to unload.\n"));
210
211 } _SEH2_FINALLY {
212
213 if (GlobalDataResourceAcquired) {
215 }
216
217 if (!IrpContext->ExceptionInProgress) {
218 Ext2CompleteIrpContext(IrpContext, Status);
219 }
220 } _SEH2_END;
221
222 return Status;
223}
224
225#endif
226
227extern CHAR gVersion[];
228extern CHAR gTime[];
229extern CHAR gDate[];
230
234 IN PEXT2_VOLUME_PROPERTY3 Property3,
236)
237{
238 PEXT2_VOLUME_PROPERTY3 Property2 = (PVOID)Property3;
240 struct nls_table * PageTable = NULL;
241
243 BOOLEAN GlobalDataResourceAcquired = FALSE;
244
245 _SEH2_TRY {
246
247 if (Length < 8 || !IsFlagOn(Property->Flags, EXT2_FLAG_VP_SET_GLOBAL)) {
250 }
251
252 /* query Ext2Fsd's version and built date/time*/
253 if (Property->Command == APP_CMD_QUERY_VERSION) {
256
257 if (Length < sizeof(EXT2_VOLUME_PROPERTY_VERSION)) {
260 }
261
262 RtlZeroMemory(&PVPV->Date[0], 0x20);
263 RtlZeroMemory(&PVPV->Time[0], 0x20);
264 RtlZeroMemory(&PVPV->Version[0],0x1C);
265 strncpy(&PVPV->Version[0], gVersion, 0x1B);
266 strncpy(&PVPV->Date[0], gDate, 0x1F);
267 strncpy(&PVPV->Time[0], gTime, 0x1F);
269 }
270
271 /* must be property query/set commands */
272 if (Property->Command == APP_CMD_SET_PROPERTY) {
273 if (Length < sizeof(EXT2_VOLUME_PROPERTY)) {
276 }
277 } else if (Property->Command == APP_CMD_SET_PROPERTY2) {
278 if (Length < sizeof(EXT2_VOLUME_PROPERTY2)) {
281 }
282 } else if (Property->Command == APP_CMD_SET_PROPERTY3) {
283 if (Length < sizeof(EXT2_VOLUME_PROPERTY3)) {
286 }
287 } else {
290 }
291
293 GlobalDataResourceAcquired = TRUE;
294
295
296 switch (Property->Command) {
297
299
300 if (Property3->Flags2 & EXT2_VPROP3_AUTOMOUNT) {
301 if (Property3->AutoMount)
303 else
305 }
306
308
310 if ((Ext2Global->bHidingPrefix = Property2->bHidingPrefix)) {
312 Property2->sHidingPrefix,
313 HIDINGPAT_LEN - 1);
314 }
316 if ((Ext2Global->bHidingSuffix = Property2->bHidingSuffix)) {
318 Property2->sHidingSuffix,
319 HIDINGPAT_LEN - 1);
320 }
321
323
324 if (Property->bReadonly) {
327 } else {
329 if (Property->bExt3Writable) {
331 } else {
333 }
334 }
335
336 PageTable = load_nls(Property->Codepage);
337 if (PageTable) {
338 memcpy(Ext2Global->Codepage.AnsiName, Property->Codepage, CODEPAGE_MAXLEN);
339 Ext2Global->Codepage.PageTable = PageTable;
340 }
341
342 break;
343
344 default:
345 break;
346 }
347
348 } _SEH2_FINALLY {
349
350 if (GlobalDataResourceAcquired) {
352 }
353 } _SEH2_END;
354
355 return Status;
356}
357
358
362 IN PEXT2_VOLUME_PROPERTY3 Property3,
364)
365{
366 struct nls_table * PageTable = NULL;
367 PEXT2_VOLUME_PROPERTY2 Property2 = (PVOID)Property3;
370 BOOLEAN VcbResourceAcquired = FALSE;
371
372 _SEH2_TRY {
373
374 ExAcquireResourceExclusiveLite(&Vcb->MainResource, TRUE);
375 VcbResourceAcquired = TRUE;
376
377 if (Property->Command == APP_CMD_SET_PROPERTY ||
378 Property->Command == APP_CMD_QUERY_PROPERTY) {
379 if (Length < sizeof(EXT2_VOLUME_PROPERTY)) {
382 }
383 } else if (Property->Command == APP_CMD_SET_PROPERTY2 ||
384 Property->Command == APP_CMD_QUERY_PROPERTY2) {
385 if (Length < sizeof(EXT2_VOLUME_PROPERTY2)) {
388 }
389 } else if (Property->Command == APP_CMD_SET_PROPERTY3 ||
390 Property->Command == APP_CMD_QUERY_PROPERTY3) {
391 if (Length < sizeof(EXT2_VOLUME_PROPERTY3)) {
394 }
395 }
396
397 switch (Property->Command) {
398
400
401 if (Property3->Flags2 & EXT2_VPROP3_AUTOMOUNT) {
402 if (Property3->AutoMount)
404 else
406 }
407 if (Property3->Flags2 & EXT2_VPROP3_USERIDS) {
408 SetFlag(Vcb->Flags, VCB_USER_IDS);
409 Vcb->uid = Property3->uid;
410 Vcb->gid = Property3->gid;
411 if (Property3->EIDS) {
412 Vcb->euid = Property3->euid;
413 Vcb->egid = Property3->egid;
414 SetFlag(Vcb->Flags, VCB_USER_EIDS);
415 } else {
416 Vcb->euid = Vcb->egid = 0;
417 ClearFlag(Vcb->Flags, VCB_USER_EIDS);
418 }
419 } else {
420 ClearFlag(Vcb->Flags, VCB_USER_IDS);
421 ClearFlag(Vcb->Flags, VCB_USER_EIDS);
422 Vcb->uid = Vcb->gid = 0;
423 Vcb->euid = Vcb->egid = 0;
424 }
425
427
428 RtlZeroMemory(Vcb->sHidingPrefix, HIDINGPAT_LEN);
429 if (Vcb->bHidingPrefix == Property2->bHidingPrefix) {
430 RtlCopyMemory( Vcb->sHidingPrefix,
431 Property2->sHidingPrefix,
432 HIDINGPAT_LEN - 1);
433 }
434
435 RtlZeroMemory(Vcb->sHidingSuffix, HIDINGPAT_LEN);
436 if (Vcb->bHidingSuffix == Property2->bHidingSuffix) {
437 RtlCopyMemory( Vcb->sHidingSuffix,
438 Property2->sHidingSuffix,
439 HIDINGPAT_LEN - 1);
440 }
441 Vcb->DrvLetter = Property2->DrvLetter;
442
444
445 if (Property->bReadonly) {
446 if (IsFlagOn(Vcb->Flags, VCB_INITIALIZED)) {
449 }
451
452 } else {
453
454 if (Property->bExt3Writable) {
456 }
457
458 if (!Vcb->IsExt3fs) {
460 } else if (!Property->bExt3Writable) {
462 } else if (IsFlagOn(Vcb->Flags, VCB_JOURNAL_RECOVER)) {
465 if (IsFlagOn(Vcb->Flags, VCB_JOURNAL_RECOVER)) {
467 } else {
469 }
470 } else {
472 }
473 }
474
475 PageTable = load_nls(Property->Codepage);
476 memcpy(Vcb->Codepage.AnsiName, Property->Codepage, CODEPAGE_MAXLEN);
477 Vcb->Codepage.PageTable = PageTable;
478 if (Vcb->Codepage.PageTable) {
479 Ext2InitializeLabel(Vcb, Vcb->SuperBlock);
480 }
481
482 break;
483
485
487 SetFlag(Property3->Flags2, EXT2_VPROP3_AUTOMOUNT);
488 Property3->AutoMount = TRUE;
489 } else {
490 ClearFlag(Property3->Flags2, EXT2_VPROP3_AUTOMOUNT);
491 Property3->AutoMount = FALSE;
492 }
493
494 if (IsFlagOn(Vcb->Flags, VCB_USER_IDS)) {
495 SetFlag(Property3->Flags2, EXT2_VPROP3_USERIDS);
496 Property3->uid = Vcb->uid;
497 Property3->gid = Vcb->gid;
498 if (IsFlagOn(Vcb->Flags, VCB_USER_EIDS)) {
499 Property3->EIDS = TRUE;
500 Property3->euid = Vcb->euid;
501 Property3->egid = Vcb->egid;
502 } else {
503 Property3->EIDS = FALSE;
504 }
505 } else {
506 ClearFlag(Property3->Flags2, EXT2_VPROP3_USERIDS);
507 }
508
510
511 RtlCopyMemory(Property2->UUID, Vcb->SuperBlock->s_uuid, 16);
512 Property2->DrvLetter = Vcb->DrvLetter;
513
514 if (Property2->bHidingPrefix == Vcb->bHidingPrefix) {
515 RtlCopyMemory( Property2->sHidingPrefix,
516 Vcb->sHidingPrefix,
518 } else {
519 RtlZeroMemory( Property2->sHidingPrefix,
521 }
522
523 if (Property2->bHidingSuffix == Vcb->bHidingSuffix) {
524 RtlCopyMemory( Property2->sHidingSuffix,
525 Vcb->sHidingSuffix,
527 } else {
528 RtlZeroMemory( Property2->sHidingSuffix,
530 }
531
533
534 Property->bExt2 = TRUE;
535 Property->bExt3 = Vcb->IsExt3fs;
536 Property->bReadonly = IsFlagOn(Vcb->Flags, VCB_READ_ONLY);
537 if (!Property->bReadonly && Vcb->IsExt3fs) {
538 Property->bExt3Writable = TRUE;
539 } else {
540 Property->bExt3Writable = FALSE;
541 }
542
544 if (Vcb->Codepage.PageTable) {
545 strncpy(Property->Codepage, Vcb->Codepage.PageTable->charset, CODEPAGE_MAXLEN);
546 } else {
547 strncpy(Property->Codepage, "default", CODEPAGE_MAXLEN);
548 }
549 break;
550
551 default:
553 break;
554 }
555
556 } _SEH2_FINALLY {
557
558 if (VcbResourceAcquired) {
559 ExReleaseResourceLite(&Vcb->MainResource);
560 }
561 } _SEH2_END;
562
563 return Status;
564}
565
568 IN PEXT2_IRP_CONTEXT IrpContext,
571)
572{
576
577 _SEH2_TRY {
578
579 ASSERT(IrpContext != NULL);
580 ASSERT((IrpContext->Identifier.Type == EXT2ICX) &&
581 (IrpContext->Identifier.Size == sizeof(EXT2_IRP_CONTEXT)));
582
583 if (Property->Magic != EXT2_VOLUME_PROPERTY_MAGIC) {
586 }
587
588 DeviceObject = IrpContext->DeviceObject;
591 } else {
592 Vcb = (PEXT2_VCB) DeviceObject->DeviceExtension;
593 if (!((Vcb) && (Vcb->Identifier.Type == EXT2VCB) &&
594 (Vcb->Identifier.Size == sizeof(EXT2_VCB)))) {
597 }
599 }
600
601 if (NT_SUCCESS(Status)) {
602 IrpContext->Irp->IoStatus.Information = Length;
603 }
604
605 } _SEH2_FINALLY {
606
607 if (!IrpContext->ExceptionInProgress) {
608 Ext2CompleteIrpContext(IrpContext, Status);
609 }
610 } _SEH2_END;
611
612 return Status;
613}
614
617 IN PEXT2_IRP_CONTEXT IrpContext,
618 IN PEXT2_QUERY_PERFSTAT QueryPerf,
620)
621{
622
623#ifndef __REACTOS__
625#endif
627
628 BOOLEAN GlobalDataResourceAcquired = FALSE;
630
631 _SEH2_TRY {
632
633 ASSERT(IrpContext != NULL);
634 ASSERT((IrpContext->Identifier.Type == EXT2ICX) &&
635 (IrpContext->Identifier.Size == sizeof(EXT2_IRP_CONTEXT)));
636
637 DeviceObject = IrpContext->DeviceObject;
639
640 if (QueryPerf->Magic != EXT2_QUERY_PERFSTAT_MAGIC) {
643 }
644
645 if (QueryPerf->Command != IOCTL_APP_QUERY_PERFSTAT) {
648 }
649
654 }
655
657 GlobalDataResourceAcquired = TRUE;
658
660 QueryPerf->Flags = EXT2_QUERY_PERFSTAT_VER2;
661 QueryPerf->PerfStatV2 = Ext2Global->PerfStat;
662 } else {
663 memcpy(&QueryPerf->PerfStatV1.Irps[0], &Ext2Global->PerfStat.Irps[0],
665 memcpy(&QueryPerf->PerfStatV1.Unit, &Ext2Global->PerfStat.Unit,
666 sizeof(EXT2_STAT_ARRAY_V1));
667 memcpy(&QueryPerf->PerfStatV1.Current, &Ext2Global->PerfStat.Current,
668 sizeof(EXT2_STAT_ARRAY_V1));
669 memcpy(&QueryPerf->PerfStatV1.Size, &Ext2Global->PerfStat.Size,
670 sizeof(EXT2_STAT_ARRAY_V1));
671 memcpy(&QueryPerf->PerfStatV1.Total, &Ext2Global->PerfStat.Total,
672 sizeof(EXT2_STAT_ARRAY_V1));
673 }
674
675 } else {
678 }
679
680 if (NT_SUCCESS(Status)) {
681 IrpContext->Irp->IoStatus.Information = Length;
682 }
683
684 } _SEH2_FINALLY {
685
686 if (GlobalDataResourceAcquired) {
688 }
689
690 if (!IrpContext->ExceptionInProgress) {
691 Ext2CompleteIrpContext(IrpContext, Status);
692 }
693 } _SEH2_END
694
695 return Status;
696}
697
700 IN PEXT2_IRP_CONTEXT IrpContext,
701 IN PEXT2_MOUNT_POINT MountPoint,
703)
704{
707 WCHAR Buffer[] = L"\\DosDevices\\Global\\Z:";
709
711
712 _SEH2_TRY {
713
714 ASSERT(IrpContext != NULL);
715 ASSERT((IrpContext->Identifier.Type == EXT2ICX) &&
716 (IrpContext->Identifier.Size == sizeof(EXT2_IRP_CONTEXT)));
717
718 DeviceObject = IrpContext->DeviceObject;
722 }
723
724 if (Length != sizeof(EXT2_MOUNT_POINT) ||
725 MountPoint->Magic != EXT2_APP_MOUNTPOINT_MAGIC) {
728 }
729
731 Buffer[12] = MountPoint->Link[0];
732
733 switch (MountPoint->Command) {
734
736 RtlInitUnicodeString(&Target, &MountPoint->Name[0]);
738 break;
739
742 break;
743
744 default:
746 }
747
748 } _SEH2_FINALLY {
749
750 if (!IrpContext->ExceptionInProgress) {
751 Ext2CompleteIrpContext(IrpContext, status);
752 }
753 } _SEH2_END;
754
755 return status;
756}
757
760{
761 PIRP Irp;
763 ULONG code;
766
767 ASSERT(IrpContext);
768
769 ASSERT((IrpContext->Identifier.Type == EXT2ICX) &&
770 (IrpContext->Identifier.Size == sizeof(EXT2_IRP_CONTEXT)));
771
772 Irp = IrpContext->Irp;
773
775
776 code = irpSp->Parameters.DeviceIoControl.IoControlCode;
777 length = irpSp->Parameters.DeviceIoControl.OutputBufferLength;
778
779 switch (code) {
780
783 IrpContext,
784 Irp->AssociatedIrp.SystemBuffer,
785 length
786 );
787 break;
788
791 IrpContext,
792 Irp->AssociatedIrp.SystemBuffer,
793 length
794 );
795 break;
796
799 IrpContext,
800 Irp->AssociatedIrp.SystemBuffer,
801 length
802 );
803 break;
804
805#if EXT2_UNLOAD
806 case IOCTL_PREPARE_TO_UNLOAD:
807 Status = Ext2PrepareToUnload(IrpContext);
808 break;
809#endif
810 default:
811 Status = Ext2DeviceControlNormal(IrpContext);
812 }
813
814 return Status;
815}
unsigned char BOOLEAN
char * strncpy(char *DstString, const char *SrcString, ACPI_SIZE Count)
Definition: utclib.c:427
LONG NTSTATUS
Definition: precomp.h:26
#define DEBUG(args)
Definition: rdesktop.h:129
Definition: bufpool.h:45
_In_ PIRP Irp
Definition: csq.h:116
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
NTSTATUS NTAPI CompleteRequest(IN PIRP Irp, IN NTSTATUS Status, IN ULONG_PTR Information)
Definition: dispatch.c:19
#define APP_CMD_DEL_DOS_SYMLINK
Definition: common.h:258
#define IOCTL_APP_MOUNT_POINT
Definition: common.h:11
#define EXT2_QUERY_PERFSTAT_SZV1
Definition: common.h:243
#define EXT2_APP_MOUNTPOINT_MAGIC
Definition: common.h:247
#define APP_CMD_QUERY_VERSION
Definition: common.h:150
#define APP_CMD_QUERY_PROPERTY2
Definition: common.h:154
#define IOCTL_APP_QUERY_PERFSTAT
Definition: common.h:8
#define HIDINGPAT_LEN
Definition: common.h:160
struct _EXT2_VOLUME_PROPERTY_VERSION * PEXT2_VOLUME_PROPERTY_VERSION
#define CODEPAGE_MAXLEN
Definition: common.h:159
#define APP_CMD_SET_PROPERTY2
Definition: common.h:155
#define IOCTL_APP_VOLUME_PROPERTY
Definition: common.h:5
#define EXT2_VPROP3_AUTOMOUNT
Definition: common.h:199
#define APP_CMD_SET_PROPERTY3
Definition: common.h:157
#define EXT2_QUERY_PERFSTAT_VER2
Definition: common.h:231
#define EXT2_VOLUME_PROPERTY_MAGIC
Definition: common.h:146
#define EXT2_QUERY_PERFSTAT_SZV2
Definition: common.h:244
#define EXT2_FLAG_VP_SET_GLOBAL
Definition: common.h:148
#define APP_CMD_QUERY_PROPERTY3
Definition: common.h:156
#define EXT2_VPROP3_USERIDS
Definition: common.h:200
#define EXT2_QUERY_PERFSTAT_MAGIC
Definition: common.h:230
#define APP_CMD_ADD_DOS_SYMLINK
Definition: common.h:257
#define APP_CMD_SET_PROPERTY
Definition: common.h:153
#define APP_CMD_QUERY_PROPERTY
Definition: common.h:152
_In_ PIO_STACK_LOCATION IrpSp
Definition: create.c:4137
#define IsListEmpty(ListHead)
Definition: env_spec_w32.h:954
#define ExAcquireResourceExclusiveLite(res, wait)
Definition: env_spec_w32.h:615
#define ExAcquireResourceSharedLite(res, wait)
Definition: env_spec_w32.h:621
CHAR gDate[]
Definition: init.c:24
NTSTATUS Ext2ProcessGlobalProperty(IN PDEVICE_OBJECT DeviceObject, IN PEXT2_VOLUME_PROPERTY3 Property3, IN ULONG Length)
Definition: devctl.c:232
CHAR gVersion[]
Definition: init.c:22
PEXT2_GLOBAL Ext2Global
Definition: init.c:16
NTSTATUS Ext2DeviceControlNormal(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: devctl.c:57
NTSTATUS Ext2ProcessUserProperty(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VOLUME_PROPERTY3 Property, IN ULONG Length)
Definition: devctl.c:567
NTSTATUS Ex2ProcessMountPoint(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_MOUNT_POINT MountPoint, IN ULONG Length)
Definition: devctl.c:699
NTSTATUS NTAPI Ext2DeviceControlCompletion(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PVOID Context)
Definition: devctl.c:42
NTSTATUS Ext2ProcessVolumeProperty(IN PEXT2_VCB Vcb, IN PEXT2_VOLUME_PROPERTY3 Property3, IN ULONG Length)
Definition: devctl.c:360
NTSTATUS Ext2DeviceControl(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: devctl.c:759
NTSTATUS Ex2ProcessUserPerfStat(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_QUERY_PERFSTAT QueryPerf, IN ULONG Length)
Definition: devctl.c:616
CHAR gTime[]
Definition: init.c:23
NTSTATUS Ext2InitializeLabel(IN PEXT2_VCB Vcb, IN PEXT2_SUPER_BLOCK Sb)
Definition: memory.c:2241
#define ClearFlag(_F, _SF)
Definition: ext2fs.h:191
#define SetFlag(_F, _SF)
Definition: ext2fs.h:187
#define FlagOn(_F, _SF)
Definition: ext2fs.h:179
VOID Ext2RemoveVcb(PEXT2_VCB Vcb)
Definition: memory.c:1939
#define VCB_READ_ONLY
Definition: ext2fs.h:795
@ EXT2ICX
Definition: ext2fs.h:460
@ EXT2VCB
Definition: ext2fs.h:457
#define IsExt2FsDevice(DO)
Definition: ext2fs.h:607
#define VCB_INITIALIZED
Definition: ext2fs.h:779
#define SetLongFlag(_F, _SF)
Definition: ext2fs.h:253
#define DL_INF
Definition: ext2fs.h:1399
#define VCB_DISMOUNT_PENDING
Definition: ext2fs.h:782
#define VCB_JOURNAL_RECOVER
Definition: ext2fs.h:792
VOID Ext2ClearVpbFlag(IN PVPB Vpb, IN USHORT Flag)
Definition: fsctl.c:56
INT Ext2RecoverJournal(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb)
Definition: recover.c:95
#define ClearLongFlag(_F, _SF)
Definition: ext2fs.h:254
VOID Ext2DestroyVcb(IN PEXT2_VCB Vcb)
Definition: memory.c:2813
NTSTATUS Ext2PrepareToUnload(IN PEXT2_IRP_CONTEXT IrpContext)
#define EXT2_UNLOAD_PENDING
Definition: ext2fs.h:581
struct _EXT2_VCB * PEXT2_VCB
#define VCB_FORCE_WRITING
Definition: ext2fs.h:790
#define EXT2_SUPPORT_WRITING
Definition: ext2fs.h:582
#define VCB_USER_IDS
Definition: ext2fs.h:785
#define EXT2_AUTO_MOUNT
Definition: ext2fs.h:585
#define DL_ERR
Definition: ext2fs.h:1397
#define EXT3_FORCE_WRITING
Definition: ext2fs.h:583
NTSTATUS Ext2CompleteIrpContext(IN PEXT2_IRP_CONTEXT IrpContext, IN NTSTATUS Status)
Definition: read.c:32
NTSTATUS Ext2FlushFiles(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN BOOLEAN bShutDown)
Definition: flush.c:108
NTSTATUS Ext2FlushVolume(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN BOOLEAN bShutDown)
Definition: flush.c:39
#define VCB_USER_EIDS
Definition: ext2fs.h:786
#define IsFlagOn(a, b)
Definition: ext2fs.h:177
IN OUT PVCB IN PDEVICE_OBJECT TargetDeviceObject
Definition: fatprocs.h:1674
#define _SEH2_FINALLY
Definition: filesup.c:21
#define _SEH2_END
Definition: filesup.c:22
#define _SEH2_TRY
Definition: filesup.c:19
#define _SEH2_LEAVE
Definition: filesup.c:20
Unit
Definition: gdiplusenums.h:26
Status
Definition: gdiplustypes.h:25
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
IoMarkIrpPending(Irp)
#define IoSetCompletionRoutine(_Irp, _CompletionRoutine, _Context, _InvokeOnSuccess, _InvokeOnError, _InvokeOnCancel)
Definition: irp.cpp:498
static DRIVER_UNLOAD DriverUnload
Definition: kbdclass.c:17
if(dx< 0)
Definition: linetemp.h:194
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define ASSERT(a)
Definition: mode.c:44
struct nls_table * load_nls(char *)
Definition: nls_base.c:218
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
VOID FASTCALL ExReleaseResourceLite(IN PERESOURCE Resource)
Definition: resource.c:1817
#define IoCallDriver
Definition: irp.c:1225
VOID NTAPI IoUnregisterFileSystem(IN PDEVICE_OBJECT DeviceObject)
Definition: volume.c:1056
#define L(x)
Definition: ntvdm.h:50
#define Vcb
Definition: cdprocs.h:1415
#define STATUS_SUCCESS
Definition: shellext.h:65
PDRIVER_UNLOAD DriverUnload
Definition: iotypes.h:2288
PDEVICE_OBJECT DiskdevObject
Definition: ext2fs.h:530
PDRIVER_OBJECT DriverObject
Definition: ext2fs.h:527
EXT2_PERF_STATISTICS_V2 PerfStat
Definition: ext2fs.h:573
CHAR sHidingSuffix[HIDINGPAT_LEN]
Definition: ext2fs.h:565
BOOLEAN bHidingSuffix
Definition: ext2fs.h:564
ERESOURCE Resource
Definition: ext2fs.h:510
ULONG Flags
Definition: ext2fs.h:514
BOOLEAN bHidingPrefix
Definition: ext2fs.h:562
CHAR sHidingPrefix[HIDINGPAT_LEN]
Definition: ext2fs.h:563
struct _EXT2_GLOBAL::@674 Codepage
LIST_ENTRY VcbList
Definition: ext2fs.h:536
PDEVICE_OBJECT CdromdevObject
Definition: ext2fs.h:533
EXT2_STAT_ARRAY_V2 Unit
Definition: common.h:131
EXT2_STAT_ARRAY_V2 Total
Definition: common.h:140
EXT2_STAT_ARRAY_V2 Size
Definition: common.h:137
struct _EXT2_PERF_STATISTICS_V2::@671 Irps[IRP_MJ_MAXIMUM_FUNCTION+1]
BOOLEAN bHidingPrefix
Definition: common.h:192
CHAR sHidingSuffix[HIDINGPAT_LEN]
Definition: common.h:195
BOOLEAN bHidingSuffix
Definition: common.h:193
CHAR sHidingPrefix[HIDINGPAT_LEN]
Definition: common.h:194
PFILE_OBJECT FileObject
Definition: iotypes.h:3169
Definition: typedefs.h:120
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121
Definition: inflate.c:139
Definition: ps.c:97
static PMEM_HOOK PageTable[TOTAL_PAGES]
Definition: memory.c:43
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
#define NTAPI
Definition: typedefs.h:36
void * PVOID
Definition: typedefs.h:50
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define IN
Definition: typedefs.h:39
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
#define STATUS_INVALID_DEVICE_REQUEST
Definition: udferr_usr.h:138
#define STATUS_ACCESS_DENIED
Definition: udferr_usr.h:145
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
static int Link(const char **args)
Definition: vfdcmd.c:2414
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_In_ WDFIOTARGET Target
Definition: wdfrequest.h:306
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetNextIrpStackLocation(_In_ PIRP Irp)
Definition: iofuncs.h:2695
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(_In_ PIRP Irp)
Definition: iofuncs.h:2793
irpSp
Definition: iofuncs.h:2719
#define VPB_MOUNTED
Definition: iotypes.h:1807
__wchar_t WCHAR
Definition: xmlstorage.h:180
char CHAR
Definition: xmlstorage.h:175