MCPcopy Create free account
hub / github.com/bobranten/Ext4Fsd / DriverEntry

Function DriverEntry

Ext4Fsd/init.c:450–837  ·  view source on GitHub ↗

* NAME: DriverEntry * FUNCTION: Called by the system to initalize the driver * * ARGUMENTS: * DriverObject = object describing this driver * RegistryPath = path to our configuration entries * RETURNS: Success or failure */

Source from the content-addressed store, hash-verified

448 * RETURNS: Success or failure
449 */
450NTSTATUS
451DriverEntry (
452 IN PDRIVER_OBJECT DriverObject,
453 IN PUNICODE_STRING RegistryPath
454)
455{
456 PDEVICE_OBJECT DiskdevObject = NULL;
457 PDEVICE_OBJECT CdromdevObject = NULL;
458 UNICODE_STRING DeviceName;
459 UNICODE_STRING DosDeviceName;
460
461 PFAST_IO_DISPATCH FastIoDispatch;
462 PCACHE_MANAGER_CALLBACKS CacheManagerCallbacks;
463
464 NTSTATUS Status;
465
466 int rc = 0;
467 BOOLEAN linux_lib_inited = FALSE;
468 BOOLEAN journal_module_inited = FALSE;
469
470 /* Verity super block ... */
471 ASSERT(sizeof(EXT2_SUPER_BLOCK) == 1024);
472 ASSERT(FIELD_OFFSET(EXT2_SUPER_BLOCK, s_magic) == 56);
473
474 DbgPrint(
475 "Ext2Fsd --"
476#ifdef _WIN2K_TARGET_
477 " Win2k --"
478#endif
479 " Version "
480 EXT2FSD_VERSION
481#if EXT2_DEBUG
482 " Checked"
483#else
484 " Free"
485#endif
486 " -- "
487 __DATE__ " "
488 __TIME__ ".\n");
489
490 DEBUG(DL_FUN, ( "Ext2 DriverEntry ...\n"));
491
492 /* initialize winlib structures */
493 if (ext2_init_linux()) {
494 Status = STATUS_INSUFFICIENT_RESOURCES;
495 goto errorout;
496 }
497 linux_lib_inited = TRUE;
498
499 /* initialize journal module structures */
500 LOAD_MODULE(journal_init);
501 if (rc != 0) {
502 Status = STATUS_INSUFFICIENT_RESOURCES;
503 goto errorout;
504 }
505 journal_module_inited = TRUE;
506
507 /* allocate memory for Ext2Global */

Callers

nothing calls this directly

Calls 10

ext2_init_linuxFunction · 0.85
Ext2AllocatePoolFunction · 0.85
Ext2StartReaperFunction · 0.85
Ext2StopReaperFunction · 0.85
Ext2GetProcessNameOffsetFunction · 0.85
Ext2LoadAllNlsFunction · 0.85
load_nlsFunction · 0.85
Ext2FreePoolFunction · 0.85
ext2_destroy_linuxFunction · 0.85

Tested by

no test coverage detected