ReactOS 0.4.15-dev-7659-ga55345b
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
20#ifdef __REACTOS__
22#else
24#endif
27 IN PIRP Irp,
29
30
31#ifdef ALLOC_PRAGMA
32#pragma alloc_text(PAGE, Ext2DeviceControl)
33#pragma alloc_text(PAGE, Ext2DeviceControlNormal)
34#pragma alloc_text(PAGE, Ext2ProcessVolumeProperty)
35#pragma alloc_text(PAGE, Ext2ProcessUserProperty)
36#pragma alloc_text(PAGE, Ext2ProcessGlobalProperty)
37#pragma alloc_text(PAGE, Ex2ProcessUserPerfStat)
38#pragma alloc_text(PAGE, Ex2ProcessMountPoint)
39#if EXT2_UNLOAD
40#pragma alloc_text(PAGE, Ext2PrepareToUnload)
41#endif
42#endif
43
44
45#ifdef __REACTOS__
47#else
49#endif
52 IN PIRP Irp,
54)
55{
56 if (Irp->PendingReturned) {
58 }
59
60 return STATUS_SUCCESS;
61}
62
63
66{
70
72
73 PIRP Irp;
75 PIO_STACK_LOCATION NextIrpSp;
76
78
79 _SEH2_TRY {
80
81 ASSERT(IrpContext != NULL);
82
83 ASSERT((IrpContext->Identifier.Type == EXT2ICX) &&
84 (IrpContext->Identifier.Size == sizeof(EXT2_IRP_CONTEXT)));
85
87
88 DeviceObject = IrpContext->DeviceObject;
89
93 }
94
95 Irp = IrpContext->Irp;
97
98 Vcb = (PEXT2_VCB) IrpSp->FileObject->FsContext;
99
100 if (!((Vcb) && (Vcb->Identifier.Type == EXT2VCB) &&
101 (Vcb->Identifier.Size == sizeof(EXT2_VCB)))) {
104 }
105
106 TargetDeviceObject = Vcb->TargetDeviceObject;
107
108 //
109 // Pass on the IOCTL to the driver below
110 //
111
113
114 NextIrpSp = IoGetNextIrpStackLocation( Irp );
115 *NextIrpSp = *IrpSp;
116
118 Irp,
120 NULL,
121 FALSE,
122 TRUE,
123 TRUE );
124
126
127 } _SEH2_FINALLY {
128
129 if (!IrpContext->ExceptionInProgress) {
130 if (IrpContext) {
131 if (!CompleteRequest) {
132 IrpContext->Irp = NULL;
133 }
134
135 Ext2CompleteIrpContext(IrpContext, Status);
136 }
137 }
138 } _SEH2_END;
139
140 return Status;
141}
142
143
144#if EXT2_UNLOAD
145
148{
151 BOOLEAN GlobalDataResourceAcquired = FALSE;
152
153 _SEH2_TRY {
154
155 ASSERT(IrpContext != NULL);
156
157 ASSERT((IrpContext->Identifier.Type == EXT2ICX) &&
158 (IrpContext->Identifier.Size == sizeof(EXT2_IRP_CONTEXT)));
159
160 DeviceObject = IrpContext->DeviceObject;
161
165 }
166
169 TRUE );
170
171 GlobalDataResourceAcquired = TRUE;
172
174 DEBUG(DL_ERR, ( "Ext2PrepareUnload: Already ready to unload.\n"));
175
177
179 }
180
181 {
183 PLIST_ENTRY ListEntry;
184
185 ListEntry = Ext2Global->VcbList.Flink;
186
187 while (ListEntry != &(Ext2Global->VcbList)) {
188
189 Vcb = CONTAINING_RECORD(ListEntry, EXT2_VCB, Next);
190 ListEntry = ListEntry->Flink;
191
192 if (Vcb && (!Vcb->ReferenceCount) &&
196
198 }
199 }
200 }
201
202 if (!IsListEmpty(&(Ext2Global->VcbList))) {
203
204 DEBUG(DL_ERR, ( "Ext2PrepareUnload: Mounted volumes exists.\n"));
205
207
209 }
210
216
217 DEBUG(DL_INF, ( "Ext2PrepareToUnload: Driver is ready to unload.\n"));
218
219 } _SEH2_FINALLY {
220
221 if (GlobalDataResourceAcquired) {
223 }
224
225 if (!IrpContext->ExceptionInProgress) {
226 Ext2CompleteIrpContext(IrpContext, Status);
227 }
228 } _SEH2_END;
229
230 return Status;
231}
232
233#endif
234
235extern CHAR gVersion[];
236extern CHAR gTime[];
237extern CHAR gDate[];
238
242 IN PEXT2_VOLUME_PROPERTY3 Property3,
244)
245{
246 PEXT2_VOLUME_PROPERTY3 Property2 = (PVOID)Property3;
248 struct nls_table * PageTable = NULL;
249
251 BOOLEAN GlobalDataResourceAcquired = FALSE;
252
253 _SEH2_TRY {
254
255 if (Length < 8 || !IsFlagOn(Property->Flags, EXT2_FLAG_VP_SET_GLOBAL)) {
258 }
259
260 /* query Ext2Fsd's version and built date/time*/
261 if (Property->Command == APP_CMD_QUERY_VERSION) {
264
265 if (Length < sizeof(EXT2_VOLUME_PROPERTY_VERSION)) {
268 }
269
270 RtlZeroMemory(&PVPV->Date[0], 0x20);
271 RtlZeroMemory(&PVPV->Time[0], 0x20);
272 RtlZeroMemory(&PVPV->Version[0],0x1C);
273 strncpy(&PVPV->Version[0], gVersion, 0x1B);
274 strncpy(&PVPV->Date[0], gDate, 0x1F);
275 strncpy(&PVPV->Time[0], gTime, 0x1F);
277 }
278
279 /* must be property query/set commands */
280 if (Property->Command == APP_CMD_SET_PROPERTY) {
281 if (Length < sizeof(EXT2_VOLUME_PROPERTY)) {
284 }
285 } else if (Property->Command == APP_CMD_SET_PROPERTY2) {
286 if (Length < sizeof(EXT2_VOLUME_PROPERTY2)) {
289 }
290 } else if (Property->Command == APP_CMD_SET_PROPERTY3) {
291 if (Length < sizeof(EXT2_VOLUME_PROPERTY3)) {
294 }
295 } else {
298 }
299
301 GlobalDataResourceAcquired = TRUE;
302
303
304 switch (Property->Command) {
305
307
308 if (Property3->Flags2 & EXT2_VPROP3_AUTOMOUNT) {
309 if (Property3->AutoMount)
311 else
313 }
314
316
318 if ((Ext2Global->bHidingPrefix = Property2->bHidingPrefix)) {
320 Property2->sHidingPrefix,
321 HIDINGPAT_LEN - 1);
322 }
324 if ((Ext2Global->bHidingSuffix = Property2->bHidingSuffix)) {
326 Property2->sHidingSuffix,
327 HIDINGPAT_LEN - 1);
328 }
329
331
332 if (Property->bReadonly) {
335 } else {
337 if (Property->bExt3Writable) {
339 } else {
341 }
342 }
343
344 PageTable = load_nls(Property->Codepage);
345 if (PageTable) {
346 memcpy(Ext2Global->Codepage.AnsiName, Property->Codepage, CODEPAGE_MAXLEN);
347 Ext2Global->Codepage.PageTable = PageTable;
348 }
349
350 break;
351
352 default:
353 break;
354 }
355
356 } _SEH2_FINALLY {
357
358 if (GlobalDataResourceAcquired) {
360 }
361 } _SEH2_END;
362
363 return Status;
364}
365
366
370 IN PEXT2_VOLUME_PROPERTY3 Property3,
372)
373{
374 struct nls_table * PageTable = NULL;
375 PEXT2_VOLUME_PROPERTY2 Property2 = (PVOID)Property3;
378 BOOLEAN VcbResourceAcquired = FALSE;
379
380 _SEH2_TRY {
381
382 ExAcquireResourceExclusiveLite(&Vcb->MainResource, TRUE);
383 VcbResourceAcquired = TRUE;
384
385 if (Property->Command == APP_CMD_SET_PROPERTY ||
386 Property->Command == APP_CMD_QUERY_PROPERTY) {
387 if (Length < sizeof(EXT2_VOLUME_PROPERTY)) {
390 }
391 } else if (Property->Command == APP_CMD_SET_PROPERTY2 ||
392 Property->Command == APP_CMD_QUERY_PROPERTY2) {
393 if (Length < sizeof(EXT2_VOLUME_PROPERTY2)) {
396 }
397 } else if (Property->Command == APP_CMD_SET_PROPERTY3 ||
398 Property->Command == APP_CMD_QUERY_PROPERTY3) {
399 if (Length < sizeof(EXT2_VOLUME_PROPERTY3)) {
402 }
403 }
404
405 switch (Property->Command) {
406
408
409 if (Property3->Flags2 & EXT2_VPROP3_AUTOMOUNT) {
410 if (Property3->AutoMount)
412 else
414 }
415 if (Property3->Flags2 & EXT2_VPROP3_USERIDS) {
416 SetFlag(Vcb->Flags, VCB_USER_IDS);
417 Vcb->uid = Property3->uid;
418 Vcb->gid = Property3->gid;
419 if (Property3->EIDS) {
420 Vcb->euid = Property3->euid;
421 Vcb->egid = Property3->egid;
422 SetFlag(Vcb->Flags, VCB_USER_EIDS);
423 } else {
424 Vcb->euid = Vcb->egid = 0;
425 ClearFlag(Vcb->Flags, VCB_USER_EIDS);
426 }
427 } else {
428 ClearFlag(Vcb->Flags, VCB_USER_IDS);
429 ClearFlag(Vcb->Flags, VCB_USER_EIDS);
430 Vcb->uid = Vcb->gid = 0;
431 Vcb->euid = Vcb->egid = 0;
432 }
433
435
436 RtlZeroMemory(Vcb->sHidingPrefix, HIDINGPAT_LEN);
437#ifdef __REACTOS__
438 if (Vcb->bHidingPrefix == Property2->bHidingPrefix) {
439#else
440 if (Vcb->bHidingPrefix = Property2->bHidingPrefix) {
441#endif
442 RtlCopyMemory( Vcb->sHidingPrefix,
443 Property2->sHidingPrefix,
444 HIDINGPAT_LEN - 1);
445 }
446
447 RtlZeroMemory(Vcb->sHidingSuffix, HIDINGPAT_LEN);
448#ifdef __REACTOS__
449 if (Vcb->bHidingSuffix == Property2->bHidingSuffix) {
450#else
451 if (Vcb->bHidingSuffix = Property2->bHidingSuffix) {
452#endif
453 RtlCopyMemory( Vcb->sHidingSuffix,
454 Property2->sHidingSuffix,
455 HIDINGPAT_LEN - 1);
456 }
457 Vcb->DrvLetter = Property2->DrvLetter;
458
460
461 if (Property->bReadonly) {
462 if (IsFlagOn(Vcb->Flags, VCB_INITIALIZED)) {
465 }
467
468 } else {
469
470 if (Property->bExt3Writable) {
472 }
473
474 if (!Vcb->IsExt3fs) {
476 } else if (!Property->bExt3Writable) {
478 } else if (IsFlagOn(Vcb->Flags, VCB_JOURNAL_RECOVER)) {
481 if (IsFlagOn(Vcb->Flags, VCB_JOURNAL_RECOVER)) {
483 } else {
485 }
486 } else {
488 }
489 }
490
491 PageTable = load_nls(Property->Codepage);
492 memcpy(Vcb->Codepage.AnsiName, Property->Codepage, CODEPAGE_MAXLEN);
493 Vcb->Codepage.PageTable = PageTable;
494 if (Vcb->Codepage.PageTable) {
495 Ext2InitializeLabel(Vcb, Vcb->SuperBlock);
496 }
497
498 break;
499
501
503 SetFlag(Property3->Flags2, EXT2_VPROP3_AUTOMOUNT);
504 Property3->AutoMount = TRUE;
505 } else {
506 ClearFlag(Property3->Flags2, EXT2_VPROP3_AUTOMOUNT);
507 Property3->AutoMount = FALSE;
508 }
509
510 if (IsFlagOn(Vcb->Flags, VCB_USER_IDS)) {
511 SetFlag(Property3->Flags2, EXT2_VPROP3_USERIDS);
512 Property3->uid = Vcb->uid;
513 Property3->gid = Vcb->gid;
514 if (IsFlagOn(Vcb->Flags, VCB_USER_EIDS)) {
515 Property3->EIDS = TRUE;
516 Property3->euid = Vcb->euid;
517 Property3->egid = Vcb->egid;
518 } else {
519 Property3->EIDS = FALSE;
520 }
521 } else {
522 ClearFlag(Property3->Flags2, EXT2_VPROP3_USERIDS);
523 }
524
526
527 RtlCopyMemory(Property2->UUID, Vcb->SuperBlock->s_uuid, 16);
528 Property2->DrvLetter = Vcb->DrvLetter;
529
530#ifdef __REACTOS__
531 if (Property2->bHidingPrefix == Vcb->bHidingPrefix) {
532#else
533 if (Property2->bHidingPrefix = Vcb->bHidingPrefix) {
534#endif
535 RtlCopyMemory( Property2->sHidingPrefix,
536 Vcb->sHidingPrefix,
538 } else {
539 RtlZeroMemory( Property2->sHidingPrefix,
541 }
542
543#ifdef __REACTOS__
544 if (Property2->bHidingSuffix == Vcb->bHidingSuffix) {
545#else
546 if (Property2->bHidingSuffix = Vcb->bHidingSuffix) {
547#endif
548 RtlCopyMemory( Property2->sHidingSuffix,
549 Vcb->sHidingSuffix,
551 } else {
552 RtlZeroMemory( Property2->sHidingSuffix,
554 }
555
557
558 Property->bExt2 = TRUE;
559 Property->bExt3 = Vcb->IsExt3fs;
560 Property->bReadonly = IsFlagOn(Vcb->Flags, VCB_READ_ONLY);
561 if (!Property->bReadonly && Vcb->IsExt3fs) {
562 Property->bExt3Writable = TRUE;
563 } else {
564 Property->bExt3Writable = FALSE;
565 }
566
568 if (Vcb->Codepage.PageTable) {
569 strncpy(Property->Codepage, Vcb->Codepage.PageTable->charset, CODEPAGE_MAXLEN);
570 } else {
571 strncpy(Property->Codepage, "default", CODEPAGE_MAXLEN);
572 }
573 break;
574
575 default:
577 break;
578 }
579
580 } _SEH2_FINALLY {
581
582 if (VcbResourceAcquired) {
583 ExReleaseResourceLite(&Vcb->MainResource);
584 }
585 } _SEH2_END;
586
587 return Status;
588}
589
592 IN PEXT2_IRP_CONTEXT IrpContext,
595)
596{
600
601 _SEH2_TRY {
602
603 ASSERT(IrpContext != NULL);
604 ASSERT((IrpContext->Identifier.Type == EXT2ICX) &&
605 (IrpContext->Identifier.Size == sizeof(EXT2_IRP_CONTEXT)));
606
607 if (Property->Magic != EXT2_VOLUME_PROPERTY_MAGIC) {
610 }
611
612 DeviceObject = IrpContext->DeviceObject;
615 } else {
616 Vcb = (PEXT2_VCB) DeviceObject->DeviceExtension;
617 if (!((Vcb) && (Vcb->Identifier.Type == EXT2VCB) &&
618 (Vcb->Identifier.Size == sizeof(EXT2_VCB)))) {
621 }
623 }
624
625 if (NT_SUCCESS(Status)) {
626 IrpContext->Irp->IoStatus.Information = Length;
627 }
628
629 } _SEH2_FINALLY {
630
631 if (!IrpContext->ExceptionInProgress) {
632 Ext2CompleteIrpContext(IrpContext, Status);
633 }
634 } _SEH2_END;
635
636 return Status;
637}
638
641 IN PEXT2_IRP_CONTEXT IrpContext,
642 IN PEXT2_QUERY_PERFSTAT QueryPerf,
644)
645{
646
647#ifndef __REACTOS__
649#endif
651
652 BOOLEAN GlobalDataResourceAcquired = FALSE;
654
655 _SEH2_TRY {
656
657 ASSERT(IrpContext != NULL);
658 ASSERT((IrpContext->Identifier.Type == EXT2ICX) &&
659 (IrpContext->Identifier.Size == sizeof(EXT2_IRP_CONTEXT)));
660
661 DeviceObject = IrpContext->DeviceObject;
663
664 if (QueryPerf->Magic != EXT2_QUERY_PERFSTAT_MAGIC) {
667 }
668
669 if (QueryPerf->Command != IOCTL_APP_QUERY_PERFSTAT) {
672 }
673
678 }
679
681 GlobalDataResourceAcquired = TRUE;
682
684 QueryPerf->Flags = EXT2_QUERY_PERFSTAT_VER2;
685 QueryPerf->PerfStatV2 = Ext2Global->PerfStat;
686 } else {
687 memcpy(&QueryPerf->PerfStatV1.Irps[0], &Ext2Global->PerfStat.Irps[0],
689 memcpy(&QueryPerf->PerfStatV1.Unit, &Ext2Global->PerfStat.Unit,
690 sizeof(EXT2_STAT_ARRAY_V1));
691 memcpy(&QueryPerf->PerfStatV1.Current, &Ext2Global->PerfStat.Current,
692 sizeof(EXT2_STAT_ARRAY_V1));
693 memcpy(&QueryPerf->PerfStatV1.Size, &Ext2Global->PerfStat.Size,
694 sizeof(EXT2_STAT_ARRAY_V1));
695 memcpy(&QueryPerf->PerfStatV1.Total, &Ext2Global->PerfStat.Total,
696 sizeof(EXT2_STAT_ARRAY_V1));
697 }
698
699 } else {
702 }
703
704 if (NT_SUCCESS(Status)) {
705 IrpContext->Irp->IoStatus.Information = Length;
706 }
707
708 } _SEH2_FINALLY {
709
710 if (GlobalDataResourceAcquired) {
712 }
713
714 if (!IrpContext->ExceptionInProgress) {
715 Ext2CompleteIrpContext(IrpContext, Status);
716 }
717 } _SEH2_END
718
719 return Status;
720}
721
724 IN PEXT2_IRP_CONTEXT IrpContext,
725 IN PEXT2_MOUNT_POINT MountPoint,
727)
728{
731 WCHAR Buffer[] = L"\\DosDevices\\Global\\Z:";
733
735
736 _SEH2_TRY {
737
738 ASSERT(IrpContext != NULL);
739 ASSERT((IrpContext->Identifier.Type == EXT2ICX) &&
740 (IrpContext->Identifier.Size == sizeof(EXT2_IRP_CONTEXT)));
741
742 DeviceObject = IrpContext->DeviceObject;
746 }
747
748 if (Length != sizeof(EXT2_MOUNT_POINT) ||
749 MountPoint->Magic != EXT2_APP_MOUNTPOINT_MAGIC) {
752 }
753
755 Buffer[12] = MountPoint->Link[0];
756
757 switch (MountPoint->Command) {
758
760 RtlInitUnicodeString(&Target, &MountPoint->Name[0]);
762 break;
763
766 break;
767
768 default:
770 }
771
772 } _SEH2_FINALLY {
773
774 if (!IrpContext->ExceptionInProgress) {
775 Ext2CompleteIrpContext(IrpContext, status);
776 }
777 } _SEH2_END;
778
779 return status;
780}
781
784{
785 PIRP Irp;
787 ULONG code;
790
791 ASSERT(IrpContext);
792
793 ASSERT((IrpContext->Identifier.Type == EXT2ICX) &&
794 (IrpContext->Identifier.Size == sizeof(EXT2_IRP_CONTEXT)));
795
796 Irp = IrpContext->Irp;
797
799
800 code = irpSp->Parameters.DeviceIoControl.IoControlCode;
801 length = irpSp->Parameters.DeviceIoControl.OutputBufferLength;
802
803 switch (code) {
804
807 IrpContext,
808 Irp->AssociatedIrp.SystemBuffer,
809 length
810 );
811 break;
812
815 IrpContext,
816 Irp->AssociatedIrp.SystemBuffer,
817 length
818 );
819 break;
820
823 IrpContext,
824 Irp->AssociatedIrp.SystemBuffer,
825 length
826 );
827 break;
828
829#if EXT2_UNLOAD
830 case IOCTL_PREPARE_TO_UNLOAD:
831 Status = Ext2PrepareToUnload(IrpContext);
832 break;
833#endif
834 default:
835 Status = Ext2DeviceControlNormal(IrpContext);
836 }
837
838 return Status;
839}
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:263
#define IOCTL_APP_MOUNT_POINT
Definition: common.h:11
#define EXT2_QUERY_PERFSTAT_SZV1
Definition: common.h:248
#define EXT2_APP_MOUNTPOINT_MAGIC
Definition: common.h:252
#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:203
#define APP_CMD_SET_PROPERTY3
Definition: common.h:157
#define EXT2_QUERY_PERFSTAT_VER2
Definition: common.h:236
#define EXT2_VOLUME_PROPERTY_MAGIC
Definition: common.h:146
#define EXT2_QUERY_PERFSTAT_SZV2
Definition: common.h:249
#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:204
#define EXT2_QUERY_PERFSTAT_MAGIC
Definition: common.h:235
#define APP_CMD_ADD_DOS_SYMLINK
Definition: common.h:262
#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:240
CHAR gVersion[]
Definition: init.c:22
PEXT2_GLOBAL Ext2Global
Definition: init.c:16
NTSTATUS Ext2DeviceControlNormal(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: devctl.c:65
NTSTATUS Ext2ProcessUserProperty(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VOLUME_PROPERTY3 Property, IN ULONG Length)
Definition: devctl.c:591
NTSTATUS Ex2ProcessMountPoint(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_MOUNT_POINT MountPoint, IN ULONG Length)
Definition: devctl.c:723
NTSTATUS Ext2DeviceControlCompletion(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PVOID Context)
Definition: devctl.c:50
NTSTATUS Ext2ProcessVolumeProperty(IN PEXT2_VCB Vcb, IN PEXT2_VOLUME_PROPERTY3 Property3, IN ULONG Length)
Definition: devctl.c:368
NTSTATUS Ext2DeviceControl(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: devctl.c:783
NTSTATUS Ex2ProcessUserPerfStat(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_QUERY_PERFSTAT QueryPerf, IN ULONG Length)
Definition: devctl.c:640
CHAR gTime[]
Definition: init.c:23
NTSTATUS Ext2InitializeLabel(IN PEXT2_VCB Vcb, IN PEXT2_SUPER_BLOCK Sb)
Definition: memory.c:2253
#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:1943
#define VCB_READ_ONLY
Definition: ext2fs.h:804
@ EXT2ICX
Definition: ext2fs.h:465
@ EXT2VCB
Definition: ext2fs.h:462
#define IsExt2FsDevice(DO)
Definition: ext2fs.h:616
#define VCB_INITIALIZED
Definition: ext2fs.h:788
#define SetLongFlag(_F, _SF)
Definition: ext2fs.h:258
#define DL_INF
Definition: ext2fs.h:1436
#define VCB_DISMOUNT_PENDING
Definition: ext2fs.h:791
#define VCB_JOURNAL_RECOVER
Definition: ext2fs.h:801
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:259
VOID Ext2DestroyVcb(IN PEXT2_VCB Vcb)
Definition: memory.c:2825
NTSTATUS Ext2PrepareToUnload(IN PEXT2_IRP_CONTEXT IrpContext)
#define EXT2_UNLOAD_PENDING
Definition: ext2fs.h:590
struct _EXT2_VCB * PEXT2_VCB
#define VCB_FORCE_WRITING
Definition: ext2fs.h:799
#define EXT2_SUPPORT_WRITING
Definition: ext2fs.h:591
#define VCB_USER_IDS
Definition: ext2fs.h:794
#define EXT2_AUTO_MOUNT
Definition: ext2fs.h:594
#define DL_ERR
Definition: ext2fs.h:1434
#define EXT3_FORCE_WRITING
Definition: ext2fs.h:592
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:112
NTSTATUS Ext2FlushVolume(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN BOOLEAN bShutDown)
Definition: flush.c:43
#define VCB_USER_EIDS
Definition: ext2fs.h:795
#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:490
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:1822
#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
struct _EXT2_GLOBAL::@688 Codepage
PDEVICE_OBJECT DiskdevObject
Definition: ext2fs.h:539
PDRIVER_OBJECT DriverObject
Definition: ext2fs.h:536
EXT2_PERF_STATISTICS_V2 PerfStat
Definition: ext2fs.h:582
CHAR sHidingSuffix[HIDINGPAT_LEN]
Definition: ext2fs.h:574
BOOLEAN bHidingSuffix
Definition: ext2fs.h:573
ERESOURCE Resource
Definition: ext2fs.h:519
ULONG Flags
Definition: ext2fs.h:523
BOOLEAN bHidingPrefix
Definition: ext2fs.h:571
CHAR sHidingPrefix[HIDINGPAT_LEN]
Definition: ext2fs.h:572
LIST_ENTRY VcbList
Definition: ext2fs.h:545
PDEVICE_OBJECT CdromdevObject
Definition: ext2fs.h:542
EXT2_STAT_ARRAY_V2 Unit
Definition: common.h:131
struct _EXT2_PERF_STATISTICS_V2::@685 Irps[IRP_MJ_MAXIMUM_FUNCTION+1]
EXT2_STAT_ARRAY_V2 Total
Definition: common.h:140
EXT2_STAT_ARRAY_V2 Size
Definition: common.h:137
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