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

Method OnPartType

Ext2Mgr/Ext2MgrDlg.cpp:2080–2125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2078}
2079
2080void CExt2MgrDlg::OnPartType()
2081{
2082 CPartitionType PartType;
2083 PEXT2_VOLUME volume = NULL;
2084 PEXT2_PARTITION part = NULL;
2085 CHAR devPath[MAX_PATH];
2086
2087 if (m_bFocusVolume) {
2088 if (m_type == EXT2_VOLUME_MAGIC) {
2089 volume = (PEXT2_VOLUME) m_sdev;
2090 }
2091 } else {
2092 if (m_type == EXT2_PART_MAGIC) {
2093 part = (PEXT2_PARTITION) m_sdev;
2094 }
2095 }
2096
2097 if (volume) {
2098 part = volume->Part;
2099 if (!part) {
2100 return;
2101 }
2102 strcpy(devPath, volume->Name);
2103 } else if (part) {
2104 sprintf(devPath, "\\Device\\Harddisk%u\\Partition%u",
2105 part->Disk->OrderNo, part->Number);
2106 }
2107
2108 if (part && part->Entry &&
2109 part->Entry->PartitionStyle == PARTITION_STYLE_MBR) {
2110 PartType.m_Part = part;
2111 PartType.m_sDevice = devPath;
2112 PartType.DoModal();
2113
2114 /* update new partition type */
2115 if (PartType.m_cPartType) {
2116
2117 for (int i=0; i < m_DiskView.GetItemCount(); i++) {
2118 if ((ULONG_PTR)part == m_DiskView.GetItemData(i)) {
2119 Ext2RefreshDVPT(&m_DiskView, part, i);
2120 break;
2121 }
2122 }
2123 }
2124 }
2125}
2126
2127void CExt2MgrDlg::OnRemoveDeadLetter()
2128{

Callers

nothing calls this directly

Calls 1

Ext2RefreshDVPTFunction · 0.85

Tested by

no test coverage detected