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)
36#pragma alloc_text(PAGE, Ext2PrepareToUnload)
48 if (
Irp->PendingReturned) {
87 Irp = IrpContext->Irp;
121 if (!IrpContext->ExceptionInProgress) {
124 IrpContext->Irp =
NULL;
163 GlobalDataResourceAcquired =
TRUE;
166 DEBUG(
DL_ERR, (
"Ext2PrepareUnload: Already ready to unload.\n"));
182 ListEntry = ListEntry->
Flink;
184 if (
Vcb && (!
Vcb->ReferenceCount) &&
196 DEBUG(
DL_ERR, (
"Ext2PrepareUnload: Mounted volumes exists.\n"));
209 DEBUG(
DL_INF, (
"Ext2PrepareToUnload: Driver is ready to unload.\n"));
213 if (GlobalDataResourceAcquired) {
217 if (!IrpContext->ExceptionInProgress) {
293 GlobalDataResourceAcquired =
TRUE;
301 if (Property3->AutoMount)
312 Property2->sHidingPrefix,
318 Property2->sHidingSuffix,
350 if (GlobalDataResourceAcquired) {
375 VcbResourceAcquired =
TRUE;
402 if (Property3->AutoMount)
409 Vcb->uid = Property3->uid;
410 Vcb->gid = Property3->gid;
411 if (Property3->EIDS) {
412 Vcb->euid = Property3->euid;
413 Vcb->egid = Property3->egid;
416 Vcb->euid =
Vcb->egid = 0;
423 Vcb->euid =
Vcb->egid = 0;
458 if (!
Vcb->IsExt3fs) {
460 }
else if (!
Property->bExt3Writable) {
478 if (
Vcb->Codepage.PageTable) {
488 Property3->AutoMount =
TRUE;
491 Property3->AutoMount =
FALSE;
496 Property3->uid =
Vcb->uid;
497 Property3->gid =
Vcb->gid;
499 Property3->EIDS =
TRUE;
500 Property3->euid =
Vcb->euid;
501 Property3->egid =
Vcb->egid;
503 Property3->EIDS =
FALSE;
544 if (
Vcb->Codepage.PageTable) {
558 if (VcbResourceAcquired) {
602 IrpContext->Irp->IoStatus.Information =
Length;
607 if (!IrpContext->ExceptionInProgress) {
657 GlobalDataResourceAcquired =
TRUE;
681 IrpContext->Irp->IoStatus.Information =
Length;
686 if (GlobalDataResourceAcquired) {
690 if (!IrpContext->ExceptionInProgress) {
731 Buffer[12] = MountPoint->Link[0];
733 switch (MountPoint->Command) {
750 if (!IrpContext->ExceptionInProgress) {
772 Irp = IrpContext->Irp;
776 code =
irpSp->Parameters.DeviceIoControl.IoControlCode;
777 length =
irpSp->Parameters.DeviceIoControl.OutputBufferLength;
784 Irp->AssociatedIrp.SystemBuffer,
792 Irp->AssociatedIrp.SystemBuffer,
800 Irp->AssociatedIrp.SystemBuffer,
806 case IOCTL_PREPARE_TO_UNLOAD:
char * strncpy(char *DstString, const char *SrcString, ACPI_SIZE Count)
#define NT_SUCCESS(StatCode)
NTSTATUS NTAPI CompleteRequest(IN PIRP Irp, IN NTSTATUS Status, IN ULONG_PTR Information)
#define APP_CMD_DEL_DOS_SYMLINK
#define IOCTL_APP_MOUNT_POINT
#define EXT2_QUERY_PERFSTAT_SZV1
#define EXT2_APP_MOUNTPOINT_MAGIC
#define APP_CMD_QUERY_VERSION
#define APP_CMD_QUERY_PROPERTY2
#define IOCTL_APP_QUERY_PERFSTAT
struct _EXT2_VOLUME_PROPERTY_VERSION * PEXT2_VOLUME_PROPERTY_VERSION
#define APP_CMD_SET_PROPERTY2
#define IOCTL_APP_VOLUME_PROPERTY
#define EXT2_VPROP3_AUTOMOUNT
#define APP_CMD_SET_PROPERTY3
#define EXT2_QUERY_PERFSTAT_VER2
#define EXT2_VOLUME_PROPERTY_MAGIC
#define EXT2_QUERY_PERFSTAT_SZV2
#define EXT2_FLAG_VP_SET_GLOBAL
#define APP_CMD_QUERY_PROPERTY3
#define EXT2_VPROP3_USERIDS
#define EXT2_QUERY_PERFSTAT_MAGIC
#define APP_CMD_ADD_DOS_SYMLINK
#define APP_CMD_SET_PROPERTY
#define APP_CMD_QUERY_PROPERTY
_In_ PIO_STACK_LOCATION IrpSp
#define IsListEmpty(ListHead)
#define ExAcquireResourceExclusiveLite(res, wait)
#define ExAcquireResourceSharedLite(res, wait)
NTSTATUS Ext2ProcessGlobalProperty(IN PDEVICE_OBJECT DeviceObject, IN PEXT2_VOLUME_PROPERTY3 Property3, IN ULONG Length)
NTSTATUS Ext2DeviceControlNormal(IN PEXT2_IRP_CONTEXT IrpContext)
NTSTATUS Ext2ProcessUserProperty(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VOLUME_PROPERTY3 Property, IN ULONG Length)
NTSTATUS Ex2ProcessMountPoint(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_MOUNT_POINT MountPoint, IN ULONG Length)
NTSTATUS NTAPI Ext2DeviceControlCompletion(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN PVOID Context)
NTSTATUS Ext2ProcessVolumeProperty(IN PEXT2_VCB Vcb, IN PEXT2_VOLUME_PROPERTY3 Property3, IN ULONG Length)
NTSTATUS Ext2DeviceControl(IN PEXT2_IRP_CONTEXT IrpContext)
NTSTATUS Ex2ProcessUserPerfStat(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_QUERY_PERFSTAT QueryPerf, IN ULONG Length)
NTSTATUS Ext2InitializeLabel(IN PEXT2_VCB Vcb, IN PEXT2_SUPER_BLOCK Sb)
#define ClearFlag(_F, _SF)
VOID Ext2RemoveVcb(PEXT2_VCB Vcb)
#define IsExt2FsDevice(DO)
#define SetLongFlag(_F, _SF)
#define VCB_DISMOUNT_PENDING
#define VCB_JOURNAL_RECOVER
VOID Ext2ClearVpbFlag(IN PVPB Vpb, IN USHORT Flag)
INT Ext2RecoverJournal(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb)
#define ClearLongFlag(_F, _SF)
VOID Ext2DestroyVcb(IN PEXT2_VCB Vcb)
NTSTATUS Ext2PrepareToUnload(IN PEXT2_IRP_CONTEXT IrpContext)
#define EXT2_UNLOAD_PENDING
struct _EXT2_VCB * PEXT2_VCB
#define VCB_FORCE_WRITING
#define EXT2_SUPPORT_WRITING
#define EXT3_FORCE_WRITING
NTSTATUS Ext2CompleteIrpContext(IN PEXT2_IRP_CONTEXT IrpContext, IN NTSTATUS Status)
NTSTATUS Ext2FlushFiles(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN BOOLEAN bShutDown)
NTSTATUS Ext2FlushVolume(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN BOOLEAN bShutDown)
IN OUT PVCB IN PDEVICE_OBJECT TargetDeviceObject
GLuint GLsizei GLsizei * length
#define IoSetCompletionRoutine(_Irp, _CompletionRoutine, _Context, _InvokeOnSuccess, _InvokeOnError, _InvokeOnCancel)
static DRIVER_UNLOAD DriverUnload
#define memcpy(s1, s2, n)
struct nls_table * load_nls(char *)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
_In_ ULONG _In_ ULONG _In_ ULONG Length
VOID FASTCALL ExReleaseResourceLite(IN PERESOURCE Resource)
NTSTATUS NTAPI IoCreateSymbolicLink(IN PUNICODE_STRING SymbolicLinkName, IN PUNICODE_STRING DeviceName)
NTSTATUS NTAPI IoDeleteSymbolicLink(IN PUNICODE_STRING SymbolicLinkName)
VOID NTAPI IoUnregisterFileSystem(IN PDEVICE_OBJECT DeviceObject)
PDRIVER_UNLOAD DriverUnload
PDEVICE_OBJECT DiskdevObject
PDRIVER_OBJECT DriverObject
EXT2_PERF_STATISTICS_V2 PerfStat
CHAR sHidingSuffix[HIDINGPAT_LEN]
CHAR sHidingPrefix[HIDINGPAT_LEN]
struct _EXT2_GLOBAL::@674 Codepage
PDEVICE_OBJECT CdromdevObject
struct _EXT2_PERF_STATISTICS_V2::@671 Irps[IRP_MJ_MAXIMUM_FUNCTION+1]
CHAR sHidingSuffix[HIDINGPAT_LEN]
CHAR sHidingPrefix[HIDINGPAT_LEN]
struct _LIST_ENTRY * Flink
static PMEM_HOOK PageTable[TOTAL_PAGES]
#define FIELD_OFFSET(t, f)
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_INVALID_DEVICE_REQUEST
#define STATUS_ACCESS_DENIED
#define STATUS_INVALID_PARAMETER
#define STATUS_UNSUCCESSFUL
static int Link(const char **args)
_In_ PDEVICE_OBJECT DeviceObject
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetNextIrpStackLocation(_In_ PIRP Irp)
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(_In_ PIRP Irp)