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

Method SetPartition

Ext2Mgr/Properties.cpp:324–423  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

322}
323
324void CProperties::SetPartition(PEXT2_PARTITION part)
325{
326 CString s;
327
328 ResetPartGroup();
329
330 if (m_disk != part->Disk) {
331 SetDisk(m_disk = part->Disk);
332 }
333
334 if (!m_disk->bLoaded || m_disk->Layout == NULL) {
335 cbPartBox->SetCurSel(-1);
336 return;
337 }
338
339 cbPartBox->SetCurSel(part->Number - 1);
340
341 /* set mount points */
342 SET_TEXT(IDC_MOUNT_POINTS,
343 Ext2QueryVolumeLetterStrings(
344 part->DrvLetters, NULL));
345
346 if (m_disk->SDD.RemovableMedia) {
347 SET_WIN(IDC_SDEV_CHANGE_MP, TRUE);
348 }
349
350 if (part->Volume) {
351 if (!part->Volume->bDynamic) {
352 SET_WIN(IDC_SDEV_CHANGE_MP, TRUE);
353 }
354 if (0 == part->Volume->DrvLetters){
355 SET_WIN(IDC_SDEV_QUICK_MOUNT, TRUE);
356 }
357 } else {
358 s.Format("PARTITION %d", 0);
359 SET_TEXT(IDC_PROPERTY_SDEV, s);
360
361 if (m_disk->SDD.RemovableMedia) {
362 if (m_disk->bEjected) {
363 s = "Media ejected";
364 } else {
365 s = "Stopped";
366 }
367 } else {
368 if (m_disk->Layout) {
369 s = "Not recognized";
370 } else {
371 s = "RAW";
372 }
373 }
374
375 if (0 == part->DrvLetters){
376 SET_WIN(IDC_SDEV_QUICK_MOUNT, TRUE);
377 }
378
379 SET_TEXT(IDC_SDEV_STATUS, s);
380 return;
381 }

Callers

nothing calls this directly

Calls 2

PartitionStringFunction · 0.85

Tested by

no test coverage detected