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

Method OnSdevExt2Info

Ext2Mgr/Properties.cpp:175–235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173}
174
175void CProperties::OnSdevExt2Info()
176{
177 NT::NTSTATUS status;
178 HANDLE Handle = NULL;
179 CString s;
180
181 CExt2Attribute EA;
182 PEXT2_VOLUME_PROPERTY3 EVP = NULL;
183
184 if (m_cdrom && (m_cdrom->EVP.bExt2 || m_cdrom->EVP.bExt3)) {
185 EVP = &m_cdrom->EVP;
186 EA.m_bCdrom = TRUE;
187 EA.m_DevName = m_cdrom->Name;
188 } else if (m_volume) {
189 EVP = &m_volume->EVP;
190 if (m_volume->Part)
191 EA.m_DevName = m_volume->Part->Name;
192 else
193 EA.m_DevName = m_volume->Name;
194 } else if (m_part) {
195 EVP = &m_part->Volume->EVP;
196 EA.m_DevName = m_part->Volume->Name;
197 }
198
199 if (!EVP) {
200 return;
201 }
202
203 EA.m_MainDlg = GetParent();
204 EA.m_EVP = EVP;
205
206 status = Ext2Open(EA.m_DevName.GetBuffer(EA.m_DevName.GetLength()),
207 &Handle, EXT2_DESIRED_ACCESS);
208
209 if (!NT_SUCCESS(status)) {
210
211 s.Format("Ext2Fsd service isn't started.\n");
212 AfxMessageBox(s, MB_OK | MB_ICONSTOP);
213
214 } else {
215
216 if (!Ext2QueryExt2Property(Handle, EVP)) {
217 Ext2Close(&Handle);
218 return;
219 }
220
221 Ext2Close(&Handle);
222 }
223
224
225 if (EA.DoModal() == IDOK) {
226 CExt2MgrDlg * Parent = (CExt2MgrDlg *)GetParent();
227 if (m_cdrom) {
228 Parent->UpdateCdrom(m_cdrom);
229 } else if (m_volume) {
230 Parent->UpdateVolume(m_volume);
231 } else if (m_part) {
232 Parent->UpdateVolume(m_part->Volume);

Callers

nothing calls this directly

Calls 5

Ext2OpenFunction · 0.85
Ext2QueryExt2PropertyFunction · 0.85
UpdateCdromMethod · 0.80
UpdateVolumeMethod · 0.80
Ext2CloseFunction · 0.70

Tested by

no test coverage detected