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

Function Ext2RefreshVolumePoint

Ext2Mgr/enumDisk.cpp:4864–4906  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4862}
4863
4864BOOL
4865Ext2RefreshVolumePoint(
4866 CHAR * volume,
4867 UCHAR drvChar
4868 )
4869{
4870 PEXT2_LETTER drvLetter = NULL;
4871 BOOL rc = TRUE;
4872 CHAR cLetter = 0;
4873
4874 cLetter = Ext2QueryMountPoint(volume);
4875 if (cLetter) {
4876 goto errorout;
4877 } else {
4878 rc = FALSE;
4879 }
4880
4881 if (drvChar & 0x7F) {
4882 if (Ext2InsertMountPoint(volume, drvChar & 0x7F, TRUE)) {
4883 return TRUE;
4884 }
4885 }
4886
4887 if (!rc) {
4888 Ext2VolumeArrivalNotify(volume);
4889 }
4890
4891 cLetter = Ext2QueryMountPoint(volume);
4892 if (!cLetter && (cLetter != (drvChar & 0x7F))) {
4893 Ext2InsertMountPoint(volume, drvChar & 0x7F, TRUE);
4894 }
4895
4896 cLetter = Ext2QueryMountPoint(volume);
4897 if (cLetter) {
4898 Ext2InsertMountPoint(volume, cLetter, FALSE);
4899 }
4900
4901 rc = (cLetter > 0) ? TRUE: FALSE;
4902
4903errorout:
4904
4905 return rc;
4906}
4907
4908
4909BOOL Ext2IsDrvLetterAvailable(CHAR drive)

Callers 1

AddMountPointMethod · 0.85

Calls 3

Ext2QueryMountPointFunction · 0.85
Ext2InsertMountPointFunction · 0.85
Ext2VolumeArrivalNotifyFunction · 0.85

Tested by

no test coverage detected