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

Function Ext2ProcessExt2Property

Ext2Mgr/enumDisk.cpp:3212–3240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3210
3211
3212CHAR
3213Ext2ProcessExt2Property(PEXT2_VOLUME volume)
3214{
3215 HANDLE hVolume = NULL;
3216 NT::NTSTATUS status;
3217 CHAR rc = 0;
3218
3219 status = Ext2Open(volume->Name, &hVolume, EXT2_DESIRED_ACCESS);
3220 if (!NT_SUCCESS(status)) {
3221 goto errorout;
3222 }
3223
3224 if (Ext2QueryExt2Property(hVolume, &volume->EVP)) {
3225 if (volume->DrvLetters == 0 && volume->EVP.DrvLetter) {
3226 CHAR DrvLetter = volume->EVP.DrvLetter & 0x7F;
3227 if (DrvLetter && Ext2IsDrvLetterAvailable(DrvLetter)) {
3228 rc = Ext2MountVolumeAs(volume->Name, DrvLetter);
3229 } else {
3230 rc = volume->EVP.DrvLetter = Ext2MountVolume(volume->Name);
3231 volume->EVP.DrvLetter |= 0x80;
3232 }
3233 }
3234 }
3235
3236errorout:
3237
3238 Ext2Close(&hVolume);
3239 return rc;
3240}
3241
3242BOOL Ext2ProcessExt2Volumes()
3243{

Callers 1

Ext2ProcessExt2VolumesFunction · 0.85

Calls 6

Ext2OpenFunction · 0.85
Ext2QueryExt2PropertyFunction · 0.85
Ext2IsDrvLetterAvailableFunction · 0.85
Ext2MountVolumeAsFunction · 0.85
Ext2MountVolumeFunction · 0.70
Ext2CloseFunction · 0.70

Tested by

no test coverage detected