Skip to content

Commit 361bfdb

Browse files
committed
Restore Changes
1 parent 4e68f2b commit 361bfdb

6 files changed

Lines changed: 36 additions & 1 deletion

File tree

source/Cosmos.Core/CosmosRuntimeType.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ public CosmosRuntimeType(uint aTypeId)
1212
: this()
1313
{
1414
mTypeId = aTypeId;
15+
Name = VTablesImpl.GetName(aTypeId);
16+
AssemblyQualifiedName = VTablesImpl.GetAssemblyQualifiedName(aTypeId);
1517
}
1618

1719
protected CosmosRuntimeType()

source/Cosmos.Core/Memory/HeapLarge.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public static void Init()
3636
if (xPtr == null)
3737
{
3838
Debugger.DoFail(0x67); // out of pages
39+
3940
}
4041
xPtr[0] = xPages * RAT.PageSize - PrefixBytes; // Allocated data size
4142
xPtr[1] = aSize; // Actual data size

source/Cosmos.Core/Memory/HeapSmall.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,4 +579,5 @@ private static int GetAllocatedObjectCount(SMTPage* aPage, uint aSize)
579579

580580
#endregion
581581
}
582+
582583
}

source/Cosmos.Debug.Kernel.Plugs.Asm/DebuggerAsm.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ public static void SendKernelPanic(uint id)
6060
new LiteralAssemblerCode("%endif");
6161
}
6262

63+
6364
[Inline]
6465
public static void SendCoreDump()
6566
{

source/Cosmos.Debug.Kernel/Debugger.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ public static Debugger CreateDebugger(string aRing = "", string aSection = "")
2222
public class Debugger
2323
{
2424
public static bool IgnoreAssert = false;
25-
2625
public Debugger(string aRing, string aSection)
2726
{
2827
Ring = aRing;

source/Cosmos.System2/FileSystem/Disk.cs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,23 @@ public List<ManagedPartition> Partitions
5858
i++;
5959
}
6060
}
61+
// Partitions is lost
62+
if (converted.Count == 0)
63+
{
64+
int i = 0;
65+
foreach (var item in FindLostPartitions())
66+
{
67+
var part = new ManagedPartition(item);
68+
if (MountedPartitions[i] != null)
69+
{
70+
var data = MountedPartitions[i];
71+
part.RootPath = data.RootPath;
72+
part.MountedFS = data;
73+
}
74+
converted.Add(part);
75+
i++;
76+
}
77+
}
6178

6279
return converted;
6380
}
@@ -265,6 +282,20 @@ public void FormatPartition(int index, string format, bool quick = true)
265282
}
266283
}
267284

285+
private List<Partition> FindLostPartitions()
286+
{
287+
List<Partition> list = new();
288+
foreach (var p in Partition.Partitions)
289+
{
290+
if (p.Host == Host)
291+
{
292+
// start mount
293+
list.Add(p);
294+
}
295+
}
296+
return list;
297+
}
298+
268299
private FileSystem[] MountedPartitions = new FileSystem[4];
269300
/// <summary>
270301
/// Mounts a partition

0 commit comments

Comments
 (0)