Merge pull request #507 from jp2masa/Bugfixes

General Bugfixes and Minor Changes
This commit is contained in:
Charles Betros 2016-11-12 13:58:02 -06:00 committed by GitHub
commit c7196ff873
17 changed files with 162 additions and 61 deletions

View file

@ -31,6 +31,7 @@ namespace Cosmos.Compiler.Tests.Bcl.CSharp
{ {
int xFindMe = 3; int xFindMe = 3;
int[] xArray = {1, 2, 3, 4, 5}; int[] xArray = {1, 2, 3, 4, 5};
foreach (int i in xArray) foreach (int i in xArray)
{ {
if (i == xFindMe) if (i == xFindMe)
@ -38,6 +39,7 @@ namespace Cosmos.Compiler.Tests.Bcl.CSharp
return true; return true;
} }
} }
return false; return false;
} }
@ -45,6 +47,7 @@ namespace Cosmos.Compiler.Tests.Bcl.CSharp
{ {
int xFindMe = 3; int xFindMe = 3;
var xList = new List<int> {1, 2, 3, 4, 5}; var xList = new List<int> {1, 2, 3, 4, 5};
foreach (int i in xList) foreach (int i in xList)
{ {
if (i == xFindMe) if (i == xFindMe)
@ -52,6 +55,7 @@ namespace Cosmos.Compiler.Tests.Bcl.CSharp
return true; return true;
} }
} }
return false; return false;
} }
@ -60,6 +64,7 @@ namespace Cosmos.Compiler.Tests.Bcl.CSharp
bool xResult = false; bool xResult = false;
int xFindMe = 3; int xFindMe = 3;
int[] xArray = {1, 2, 3, 4, 5}; int[] xArray = {1, 2, 3, 4, 5};
foreach (int i in xArray) foreach (int i in xArray)
{ {
if (i == xFindMe) if (i == xFindMe)
@ -67,7 +72,10 @@ namespace Cosmos.Compiler.Tests.Bcl.CSharp
xResult = true; xResult = true;
break; break;
} }
xResult = false;
} }
return xResult; return xResult;
} }
@ -76,6 +84,7 @@ namespace Cosmos.Compiler.Tests.Bcl.CSharp
bool xResult = false; bool xResult = false;
int xFindMe = 3; int xFindMe = 3;
var xList = new List<int> {1, 2, 3, 4, 5}; var xList = new List<int> {1, 2, 3, 4, 5};
foreach (int i in xList) foreach (int i in xList)
{ {
if (i == xFindMe) if (i == xFindMe)
@ -83,7 +92,10 @@ namespace Cosmos.Compiler.Tests.Bcl.CSharp
xResult = true; xResult = true;
break; break;
} }
xResult = false;
} }
return xResult; return xResult;
} }
} }

View file

@ -23,6 +23,16 @@ namespace Cosmos.Compiler.Tests.SimpleWriteLine.Kernel
Assert.IsTrue(mWasInTry, "ExplicitReturnNoReturnValue.WasInTry"); Assert.IsTrue(mWasInTry, "ExplicitReturnNoReturnValue.WasInTry");
Assert.IsTrue(mWasInFinally, "ExplicitReturnNoReturnValue.WasInFinally"); Assert.IsTrue(mWasInFinally, "ExplicitReturnNoReturnValue.WasInFinally");
Assert.IsFalse(mWasAfterFinally, "ExplicitReturnNoReturnValue.WasAfterFinally"); Assert.IsFalse(mWasAfterFinally, "ExplicitReturnNoReturnValue.WasAfterFinally");
ClearToggles();
TestNestedFinally();
Assert.IsTrue(mWasBeforeTry, "ExplicitReturnNoReturnValue.WasBeforeTry");
Assert.IsTrue(mWasInTry, "ExplicitReturnNoReturnValue.WasInTry");
Assert.IsTrue(mWasInFinally, "ExplicitReturnNoReturnValue.WasInFinally");
Assert.IsTrue(mWasInTry2, "ExplicitReturnNoReturnValue.WasInTry2");
Assert.IsTrue(mWasInFinally2, "ExplicitReturnNoReturnValue.WasInFinally2");
Assert.IsTrue(mWasAfterFinally, "ExplicitReturnNoReturnValue.WasAfterFinally");
} }
private static bool mWasBeforeTry; private static bool mWasBeforeTry;
@ -30,17 +40,24 @@ namespace Cosmos.Compiler.Tests.SimpleWriteLine.Kernel
private static bool mWasInFinally; private static bool mWasInFinally;
private static bool mWasAfterFinally; private static bool mWasAfterFinally;
private static bool mWasInTry2;
private static bool mWasInFinally2;
private static void ClearToggles() private static void ClearToggles()
{ {
mWasBeforeTry = false; mWasBeforeTry = false;
mWasInTry = false; mWasInTry = false;
mWasInFinally = false; mWasInFinally = false;
mWasAfterFinally = false; mWasAfterFinally = false;
mWasInTry2 = false;
mWasInFinally2 = false;
} }
private static void TestNormalFlowNoReturnValue() private static void TestNormalFlowNoReturnValue()
{ {
mWasBeforeTry = true; mWasBeforeTry = true;
try try
{ {
mWasInTry = true; mWasInTry = true;
@ -49,12 +66,14 @@ namespace Cosmos.Compiler.Tests.SimpleWriteLine.Kernel
{ {
mWasInFinally = true; mWasInFinally = true;
} }
mWasAfterFinally = true; mWasAfterFinally = true;
} }
private static void TestExplicitReturnNoReturnValue() private static void TestExplicitReturnNoReturnValue()
{ {
mWasBeforeTry = true; mWasBeforeTry = true;
try try
{ {
mWasInTry = true; mWasInTry = true;
@ -64,6 +83,32 @@ namespace Cosmos.Compiler.Tests.SimpleWriteLine.Kernel
{ {
mWasInFinally = true; mWasInFinally = true;
} }
mWasAfterFinally = true;
}
public static void TestNestedFinally()
{
mWasBeforeTry = true;
try
{
mWasInTry = true;
}
finally
{
try
{
mWasInTry2 = true;
}
finally
{
mWasInFinally2 = true;
}
mWasInFinally = true;
}
mWasAfterFinally = true; mWasAfterFinally = true;
} }
} }

View file

@ -1,6 +1,5 @@
using System; using System;
using Cosmos.IL2CPU.Plugs; using Cosmos.IL2CPU.Plugs;
using Cosmos.IL2CPU.Plugs.Assemblers;
using Cosmos.IL2CPU.Plugs.Assemblers.Array; using Cosmos.IL2CPU.Plugs.Assemblers.Array;
namespace Cosmos.Core.Plugs.System namespace Cosmos.Core.Plugs.System
@ -10,7 +9,7 @@ namespace Cosmos.Core.Plugs.System
{ {
[PlugMethod(Signature = "System_Void__System_Array_Clear_System_Array__System_Int32__System_Int32_")] [PlugMethod(Signature = "System_Void__System_Array_Clear_System_Array__System_Int32__System_Int32_")]
public static unsafe void Clear(uint* aArray, uint aIndex, uint aLength) public static unsafe void Clear([ObjectPointerAccess]uint* aArray, uint aIndex, uint aLength)
{ {
aArray = (uint*)aArray[0]; aArray = (uint*)aArray[0];
aArray += 3; aArray += 3;

View file

@ -642,7 +642,7 @@ namespace Cosmos.IL2CPU
} }
} }
} }
if ((xHandler.Flags & ExceptionHandlingClauseOptions.Filter) > 0) if (xHandler.Flags.HasFlag(ExceptionHandlingClauseOptions.Filter))
{ {
if (xHandler.FilterOffset > 0) if (xHandler.FilterOffset > 0)
{ {

View file

@ -1,20 +1,20 @@
using System; using XSharp.Compiler;
using CPU = Cosmos.Assembler.x86;
namespace Cosmos.IL2CPU.X86.IL namespace Cosmos.IL2CPU.X86.IL
{ {
[Cosmos.IL2CPU.OpCode( ILOpCode.Code.Br )] [OpCode(ILOpCode.Code.Br)]
public class Br : ILOp public class Br : ILOp
{ {
public Br( Cosmos.Assembler.Assembler aAsmblr ) public Br(Cosmos.Assembler.Assembler aAsmblr)
: base( aAsmblr ) : base(aAsmblr)
{ {
} }
public override void Execute( MethodInfo aMethod, ILOpCode aOpCode ) public override void Execute(MethodInfo aMethod, ILOpCode aOpCode)
{ {
new CPU.Jump { DestinationLabel = AppAssembler.TmpBranchLabel(aMethod, aOpCode) }; XS.Jump(AppAssembler.TmpBranchLabel(aMethod, aOpCode));
} //new CPU.Jump { DestinationLabel = AppAssembler.TmpBranchLabel(aMethod, aOpCode) };
} }
}
} }

View file

@ -1,9 +1,9 @@
using System; using XSharp.Compiler;
using CPUx86 = Cosmos.Assembler.x86; using static XSharp.Compiler.XSRegisters;
namespace Cosmos.IL2CPU.X86.IL namespace Cosmos.IL2CPU.X86.IL
{ {
[Cosmos.IL2CPU.OpCode(ILOpCode.Code.Dup)] [OpCode(ILOpCode.Code.Dup)]
public class Dup : ILOp public class Dup : ILOp
{ {
public Dup(Cosmos.Assembler.Assembler aAsmblr) public Dup(Cosmos.Assembler.Assembler aAsmblr)
@ -19,7 +19,8 @@ namespace Cosmos.IL2CPU.X86.IL
for (int i = StackSize; i > 0; i--) for (int i = StackSize; i > 0; i--)
{ {
new CPUx86.Push { DestinationReg = CPUx86.RegistersEnum.ESP, DestinationIsIndirect = true, DestinationDisplacement = (int)((StackSize - 1) * 4) }; XS.Push(ESP, true, (StackSize - 1) * 4);
//new CPUx86.Push { DestinationReg = CPUx86.RegistersEnum.ESP, DestinationIsIndirect = true, DestinationDisplacement = (int)((StackSize - 1) * 4) };
} }
} }

View file

@ -1,17 +1,21 @@
using System; using CPUx86 = Cosmos.Assembler.x86;
using XSharp.Compiler;
using static XSharp.Compiler.XSRegisters;
namespace Cosmos.IL2CPU.X86.IL namespace Cosmos.IL2CPU.X86.IL
{ {
[Cosmos.IL2CPU.OpCode(ILOpCode.Code.Endfinally)] [OpCode(ILOpCode.Code.Endfinally)]
public class Endfinally: ILOp public class Endfinally : ILOp
{ {
public Endfinally(Cosmos.Assembler.Assembler aAsmblr):base(aAsmblr) public Endfinally(Cosmos.Assembler.Assembler aAsmblr) : base(aAsmblr)
{ {
} }
public override void Execute(MethodInfo aMethod, ILOpCode aOpCode) { public override void Execute(MethodInfo aMethod, ILOpCode aOpCode)
// throw new NotImplementedException(); {
XS.DataMember(aMethod.MethodBase.GetFullName() + "_" + "LeaveAddress_" + aOpCode.CurrentExceptionHandler.HandlerOffset.ToString("X2"), 0);
XS.Set(EAX, aMethod.MethodBase.GetFullName() + "_" + "LeaveAddress_" + aOpCode.CurrentExceptionHandler.HandlerOffset.ToString("X2"));
new CPUx86.Jump { DestinationReg = EAX, DestinationIsIndirect = true };
}
} }
}
} }

View file

@ -1,28 +1,31 @@
using System;
using System.Reflection; using System.Reflection;
using CPUx86 = Cosmos.Assembler.x86;
using XSharp.Compiler;
using static XSharp.Compiler.XSRegisters;
namespace Cosmos.IL2CPU.X86.IL namespace Cosmos.IL2CPU.X86.IL
{ {
[Cosmos.IL2CPU.OpCode( ILOpCode.Code.Leave )] [OpCode(ILOpCode.Code.Leave)]
public class Leave : ILOp public class Leave : ILOp
{ {
public Leave( Cosmos.Assembler.Assembler aAsmblr ) public Leave(Cosmos.Assembler.Assembler aAsmblr)
: base( aAsmblr ) : base(aAsmblr)
{ {
} }
public override void Execute( MethodInfo aMethod, ILOpCode aOpCode ) public override void Execute(MethodInfo aMethod, ILOpCode aOpCode)
{ {
// apparently, Roslyn changed something to the output. We now have to figure out where to jump to. // apparently, Roslyn changed something to the output. We now have to figure out where to jump to.
if (aOpCode.CurrentExceptionHandler.Flags.HasFlag(ExceptionHandlingClauseOptions.Finally) if (aOpCode.CurrentExceptionHandler.Flags.HasFlag(ExceptionHandlingClauseOptions.Finally)
&& aOpCode.CurrentExceptionHandler.HandlerOffset > aOpCode.Position) && aOpCode.CurrentExceptionHandler.HandlerOffset > aOpCode.Position)
{ {
new CPUx86.Jump {DestinationLabel = AppAssembler.TmpPosLabel(aMethod, aOpCode.CurrentExceptionHandler.HandlerOffset)}; XS.Set(aMethod.MethodBase.GetFullName() + "_" + "LeaveAddress_" + aOpCode.CurrentExceptionHandler.HandlerOffset.ToString("X2"), Assembler.CurrentIlLabel + "." + (Assembler.AsmIlIdx + 2).ToString("X2"), destinationIsIndirect: true, size: RegisterSize.Int32);
} XS.Jump(AppAssembler.TmpPosLabel(aMethod, aOpCode.CurrentExceptionHandler.HandlerOffset));
else //new CPUx86.Jump {DestinationLabel = AppAssembler.TmpPosLabel(aMethod, aOpCode.CurrentExceptionHandler.HandlerOffset + aOpCode.CurrentExceptionHandler.HandlerLength) };
{
new CPUx86.Jump {DestinationLabel = AppAssembler.TmpBranchLabel(aMethod, aOpCode)};
} }
XS.Jump(AppAssembler.TmpBranchLabel(aMethod, aOpCode));
//new CPUx86.Jump {DestinationLabel = AppAssembler.TmpBranchLabel(aMethod, aOpCode)};
} }

View file

@ -94,12 +94,14 @@ namespace Cosmos.IL2CPU
protected static void Jump_Exception(MethodInfo aMethod) protected static void Jump_Exception(MethodInfo aMethod)
{ {
// todo: port to numeric labels // todo: port to numeric labels
new CPU.Jump { DestinationLabel = GetMethodLabel(aMethod) + AppAssembler.EndOfMethodLabelNameException }; XS.Jump (GetMethodLabel(aMethod) + AppAssembler.EndOfMethodLabelNameException);
//new CPU.Jump { DestinationLabel = GetMethodLabel(aMethod) + AppAssembler.EndOfMethodLabelNameException };
} }
protected static void Jump_End(MethodInfo aMethod) protected static void Jump_End(MethodInfo aMethod)
{ {
new CPU.Jump { DestinationLabel = GetMethodLabel(aMethod) + AppAssembler.EndOfMethodLabelNameNormal }; XS.Jump(GetMethodLabel(aMethod) + AppAssembler.EndOfMethodLabelNameNormal);
//new CPU.Jump { DestinationLabel = GetMethodLabel(aMethod) + AppAssembler.EndOfMethodLabelNameNormal };
} }
public static uint GetStackCountForLocal(MethodInfo aMethod, LocalVariableInfo aField) public static uint GetStackCountForLocal(MethodInfo aMethod, LocalVariableInfo aField)

View file

@ -4,8 +4,6 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System;
using Cosmos.IL2CPU.Plugs; using Cosmos.IL2CPU.Plugs;
namespace Cosmos.System.Plugs.System namespace Cosmos.System.Plugs.System

View file

@ -53,7 +53,9 @@ namespace Cosmos.System.Plugs.System.IO
} }
Global.mFileSystemDebugger.SendInternal($"Directory.CreateDirectory : aPath = {aPath}"); Global.mFileSystemDebugger.SendInternal($"Directory.CreateDirectory : aPath = {aPath}");
var xEntry = VFSManager.CreateDirectory(aPath); var xEntry = VFSManager.CreateDirectory(aPath);
if (xEntry == null) if (xEntry == null)
{ {
return null; return null;

View file

@ -124,24 +124,29 @@ namespace Cosmos.System.FileSystem
Global.mFileSystemDebugger.SendInternal("Path already exists."); Global.mFileSystemDebugger.SendInternal("Path already exists.");
return GetDirectory(aPath); return GetDirectory(aPath);
} }
Global.mFileSystemDebugger.SendInternal("Path doesn't exist."); Global.mFileSystemDebugger.SendInternal("Path doesn't exist.");
string xDirectoryToCreate = Path.GetFileName(aPath); string xDirectoryToCreate = Path.GetFileName(aPath);
Global.mFileSystemDebugger.SendInternal("After GetFileName"); Global.mFileSystemDebugger.SendInternal("After GetFileName");
Global.mFileSystemDebugger.SendInternal("xDirectoryToCreate ="); Global.mFileSystemDebugger.SendInternal("xDirectoryToCreate =");
Global.mFileSystemDebugger.SendInternal(xDirectoryToCreate); Global.mFileSystemDebugger.SendInternal(xDirectoryToCreate);
string xParentDirectory = aPath.Remove(aPath.Length - xDirectoryToCreate.Length); string xParentDirectory = aPath.Remove(aPath.Length - xDirectoryToCreate.Length);
Global.mFileSystemDebugger.SendInternal("After removing last path part"); Global.mFileSystemDebugger.SendInternal("After removing last path part");
Global.mFileSystemDebugger.SendInternal("xParentDirectory ="); Global.mFileSystemDebugger.SendInternal("xParentDirectory =");
Global.mFileSystemDebugger.SendInternal(xParentDirectory); Global.mFileSystemDebugger.SendInternal(xParentDirectory);
DirectoryEntry xParentEntry = GetDirectory(xParentDirectory); DirectoryEntry xParentEntry = GetDirectory(xParentDirectory);
if (xParentEntry == null) if (xParentEntry == null)
{ {
Global.mFileSystemDebugger.SendInternal("Parent directory doesn't exist."); Global.mFileSystemDebugger.SendInternal("Parent directory doesn't exist.");
xParentEntry = CreateDirectory(xParentDirectory); xParentEntry = CreateDirectory(xParentDirectory);
} }
Global.mFileSystemDebugger.SendInternal("Parent directory exists."); Global.mFileSystemDebugger.SendInternal("Parent directory exists.");
var xFS = GetFileSystemFromPath(xParentDirectory); var xFS = GetFileSystemFromPath(xParentDirectory);

View file

@ -489,18 +489,19 @@ namespace Cosmos.System.FileSystem.FAT
aSize = BytesPerCluster; aSize = BytesPerCluster;
} }
byte[] xTempData; byte[] xData;
Read(aCluster, out xTempData);
Array.Copy(aData, 0, xTempData, (long)aOffset, aData.Length); Read(aCluster, out xData);
Array.Copy(aData, 0, xData, aOffset, aData.Length);
if (mFatType == FatTypeEnum.Fat32) if (mFatType == FatTypeEnum.Fat32)
{ {
long xSector = DataSector + (aCluster - RootCluster) * SectorsPerCluster; long xSector = DataSector + (aCluster - RootCluster) * SectorsPerCluster;
mDevice.WriteBlock((ulong)xSector, SectorsPerCluster, aData); mDevice.WriteBlock((ulong) xSector, SectorsPerCluster, xData);
} }
else else
{ {
mDevice.WriteBlock((ulong)aCluster, RootSectorCount, aData); mDevice.WriteBlock((ulong) aCluster, RootSectorCount, xData);
} }
} }

View file

@ -1,11 +1,11 @@
//#define COSMOSDEBUG //#define COSMOSDEBUG
using System;
using System.Collections.Generic;
using Cosmos.Common.Extensions; using Cosmos.Common.Extensions;
using Cosmos.System.FileSystem.Listing; using Cosmos.System.FileSystem.Listing;
using global::System;
using global::System.Collections.Generic;
namespace Cosmos.System.FileSystem.FAT.Listing namespace Cosmos.System.FileSystem.FAT.Listing
{ {
using global::System.IO; using global::System.IO;
@ -114,9 +114,14 @@ namespace Cosmos.System.FileSystem.FAT.Listing
private void AllocateDirectoryEntry() private void AllocateDirectoryEntry()
{ {
// TODO: Deal with short and long name.
Global.mFileSystemDebugger.SendInternal("-- FatDirectoryEntry.AllocateDirectoryEntry --"); Global.mFileSystemDebugger.SendInternal("-- FatDirectoryEntry.AllocateDirectoryEntry --");
// TODO: Deal with short and long name.
if (mName.Length > 12)
{
throw new Exception("FatDirectoryEntry: Long Names not supported in new Directory Entries");
}
char[] xName = char[] xName =
{ {
(char)0x20, (char)0x20, (char)0x20, (char)0x20, (char)0x20, (char)0x20, (char)0x20, (char)0x20, (char)0x20, (char)0x20, (char)0x20, (char)0x20, (char)0x20, (char)0x20,
@ -151,9 +156,9 @@ namespace Cosmos.System.FileSystem.FAT.Listing
SetDirectoryEntryMetadataValue(FatDirectoryEntryMetadata.FirstClusterHigh, (uint)(mFirstClusterNum >> 16)); SetDirectoryEntryMetadataValue(FatDirectoryEntryMetadata.FirstClusterHigh, (uint)(mFirstClusterNum >> 16));
SetDirectoryEntryMetadataValue(FatDirectoryEntryMetadata.FirstClusterLow, (uint)(mFirstClusterNum & 0xFFFF)); SetDirectoryEntryMetadataValue(FatDirectoryEntryMetadata.FirstClusterLow, (uint)(mFirstClusterNum & 0xFFFF));
byte[] xData = GetDirectoryEntryData(); //byte[] xData = GetDirectoryEntryData();
SetDirectoryEntryData(xData); //SetDirectoryEntryData(xData);
} }
public FatDirectoryEntry AddDirectoryEntry(string aName, DirectoryEntryTypeEnum aType) public FatDirectoryEntry AddDirectoryEntry(string aName, DirectoryEntryTypeEnum aType)
@ -182,6 +187,7 @@ namespace Cosmos.System.FileSystem.FAT.Listing
return xNewEntry; return xNewEntry;
} }
throw new ArgumentOutOfRangeException(nameof(aType), "Unknown directory entry type."); throw new ArgumentOutOfRangeException(nameof(aType), "Unknown directory entry type.");
} }
@ -190,9 +196,28 @@ namespace Cosmos.System.FileSystem.FAT.Listing
if (mEntryType == DirectoryEntryTypeEnum.Unknown) if (mEntryType == DirectoryEntryTypeEnum.Unknown)
throw new NotImplementedException(); throw new NotImplementedException();
if (mParent != null)
{
var xData = ((FatDirectoryEntry)mParent).GetDirectoryEntryData();
var xEntryOffset = mEntryHeaderDataOffset - 32;
while (xData[xEntryOffset + 11] == FatDirectoryEntryAttributeConsts.LongName)
{
xData[xEntryOffset] = FatDirectoryEntryAttributeConsts.UnusedOrDeletedEntry;
xEntryOffset -= 32;
}
((FatDirectoryEntry)mParent).SetDirectoryEntryData(xData);
}
SetDirectoryEntryMetadataValue(FatDirectoryEntryMetadata.FirstByte, FatDirectoryEntryAttributeConsts.UnusedOrDeletedEntry); SetDirectoryEntryMetadataValue(FatDirectoryEntryMetadata.FirstByte, FatDirectoryEntryAttributeConsts.UnusedOrDeletedEntry);
} }
/// <summary>
/// Retrieves a <see cref="List{T}"/> of <see cref="FatDirectoryEntry"/> objects that represent the Directory Entries inside this Directory
/// </summary>
/// <returns>Returns a <see cref="List{T}"/> of the Directory Entries inside this Directory</returns>
public List<FatDirectoryEntry> ReadDirectoryContents() public List<FatDirectoryEntry> ReadDirectoryContents()
{ {
Global.mFileSystemDebugger.SendInternal("-- FatDirectoryEntry.ReadDirectoryContents --"); Global.mFileSystemDebugger.SendInternal("-- FatDirectoryEntry.ReadDirectoryContents --");
@ -357,6 +382,10 @@ namespace Cosmos.System.FileSystem.FAT.Listing
return xResult; return xResult;
} }
/// <summary>
/// Tries to find an empty space for a directory entry and returns the offset to that space if successful, otherwise throws an exception.
/// </summary>
/// <returns>Returns the offset to the next unallocated directory entry.</returns>
private uint GetNextUnallocatedDirectoryEntry() private uint GetNextUnallocatedDirectoryEntry()
{ {
Global.mFileSystemDebugger.SendInternal("-- FatDirectoryEntry.GetNextUnallocatedDirectoryEntry --"); Global.mFileSystemDebugger.SendInternal("-- FatDirectoryEntry.GetNextUnallocatedDirectoryEntry --");
@ -376,7 +405,7 @@ namespace Cosmos.System.FileSystem.FAT.Listing
} }
} }
// TODO: What should we return if no available entry is found. // TODO: What should we return if no available entry is found. - Update Method description above.
throw new Exception("Failed to find an unallocated directory entry."); throw new Exception("Failed to find an unallocated directory entry.");
} }

View file

@ -1,8 +1,8 @@
//#define COSMOSDEBUG //#define COSMOSDEBUG
using global::System; using System;
using global::System.Collections.Generic; using System.Collections.Generic;
using global::System.IO; using System.IO;
using Cosmos.System.FileSystem.Listing; using Cosmos.System.FileSystem.Listing;