| 3861 | } |
| 3862 | |
| 3863 | VOID |
| 3864 | Ext2RefreshDVPT( |
| 3865 | CListCtrl* List, |
| 3866 | PEXT2_PARTITION Part, |
| 3867 | int nItem |
| 3868 | ) |
| 3869 | { |
| 3870 | |
| 3871 | ULONGLONG totalSize, usedSize; |
| 3872 | CString sSize, sUnit, s; |
| 3873 | |
| 3874 | PEXT2_LETTER first = NULL; |
| 3875 | PEXT2_VOLUME chain = NULL; |
| 3876 | |
| 3877 | CString Letters = Ext2QueryVolumeLetterStrings( |
| 3878 | Part->DrvLetters, &first); |
| 3879 | |
| 3880 | List->SetItem( nItem, 0, LVIF_TEXT, (LPCSTR)Letters, 0, 0, 0,0); |
| 3881 | |
| 3882 | if (Part->Entry) { |
| 3883 | CString PartType; |
| 3884 | if (Part->Entry->PartitionStyle == PARTITION_STYLE_MBR) { |
| 3885 | PartType = PartitionString(Part->Entry->Mbr.PartitionType); |
| 3886 | } else if (Part->Entry->PartitionStyle == PARTITION_STYLE_GPT) { |
| 3887 | PartType = ""; |
| 3888 | if (Part->Entry->Gpt.Name && wcslen(Part->Entry->Gpt.Name)) { |
| 3889 | for (size_t i = 0; i < wcslen(Part->Entry->Gpt.Name); i++) |
| 3890 | PartType += (CHAR)Part->Entry->Gpt.Name[i]; |
| 3891 | |
| 3892 | } else { |
| 3893 | PartType = "GPT"; |
| 3894 | } |
| 3895 | } else { |
| 3896 | PartType = "RAW"; |
| 3897 | } |
| 3898 | |
| 3899 | List->SetItem(nItem, 6, LVIF_TEXT, (LPCSTR) |
| 3900 | PartType, 0, 0, 0,0); |
| 3901 | } |
| 3902 | |
| 3903 | /* query the volume information of the partition */ |
| 3904 | chain = Part->Volume; |
| 3905 | if (!chain) { |
| 3906 | PEXT2_DISK disk = Part->Disk; |
| 3907 | CString s; |
| 3908 | if (disk->SDD.RemovableMedia) { |
| 3909 | s.LoadString(IDS_DISK_TYPE_BASIC); |
| 3910 | } else if (disk->bLoaded){ |
| 3911 | if (disk->Layout) { |
| 3912 | if (disk->Layout->PartitionStyle == PARTITION_STYLE_MBR) { |
| 3913 | if (disk->Layout->PartitionEntry->Mbr.PartitionType |
| 3914 | == PARTITION_LDM) { |
| 3915 | s.LoadString(IDS_DISK_TYPE_DYN); |
| 3916 | } else { |
| 3917 | s.LoadString(IDS_DISK_TYPE_BASIC); |
| 3918 | } |
| 3919 | } else if (disk->Layout->PartitionStyle == PARTITION_STYLE_GPT) { |
| 3920 | s = "GPT"; |
no test coverage detected