Added VFS

git-svn-id: https://spexeah.com:8443/svn/Asuro@1318 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c
This commit is contained in:
kieron
2020-07-18 21:00:31 +00:00
parent df09f33e41
commit 6b6129b769
6 changed files with 186 additions and 9 deletions
+2 -2
View File
@@ -296,8 +296,8 @@ begin
masterDevice.sectorSize:= 512;
if masterDevice.maxSectorCount <> 0 then begin
IDEDevices[0].exists:= true;
masterDevice.readCallback:= @read;
masterDevice.writeCallback:= @write;
masterDevice.readCallback:= @IDE.read;
masterDevice.writeCallback:= @IDE.write;
storagemanagement.register_device(@masterDevice);
end;
File diff suppressed because it is too large Load Diff
+3 -1
View File
@@ -11,7 +11,6 @@ uses
console,
lmemorymanager,
util,
strings,
tracer;
type
@@ -55,6 +54,9 @@ function LL_FromString(str : pchar; delimter : char) : PLinkedListBase;
implementation
uses
strings;
{ Managed Linked List }
function LL_New(ElementSize : uint32) : PLinkedListBase;
+2 -1
View File
@@ -9,7 +9,8 @@ interface
uses
util,
lmemorymanager;
lmemorymanager,
lists;
function stringToUpper(str : pchar) : pchar;
function stringToLower(str : pchar) : pchar;
+4 -1
View File
@@ -41,7 +41,7 @@ uses
base64,
rand,
terminal,
hashmap;
hashmap, vfs;
procedure kmain(mbinfo: Pmultiboot_info_t; mbmagic: uint32); stdcall;
@@ -185,6 +185,9 @@ begin
{ Call Tracer }
tracer.init();
{ VFS Init }
vfs.init();
{ Management Interfaces }
tracer.push_trace('kmain.DRVMGMT');
drivermanagement.init();
+4 -4
View File
@@ -17,7 +17,7 @@ uses
tracer,
asuro,
serial,
netutils, nettypes;
netutils, nettypes, vfs;
type
THaltCallback = procedure();
@@ -115,13 +115,13 @@ end;
function getWorkingDirectory : pchar;
begin
getWorkingDirectory:= Working_Directory;
getWorkingDirectory:= vfs.getWorkingDirectory;
end;
procedure setWorkingDirectory(str : pchar);
begin
if str <> nil then begin
Working_Directory:= stringCopy(str);
vfs.changeDirectory(str);
end;
end;
@@ -425,7 +425,7 @@ begin
if not Halted then begin
{ Reset the terminal ready for the next command }
console.writestringWND('Asuro#', TERMINAL_HWND);
console.writestringWND(Working_Directory, TERMINAL_HWND);
console.writestringWND(vfs.getWorkingDirectory, TERMINAL_HWND);
console.writestringWND('> ', TERMINAL_HWND);
bIndex:= 0;
memset(uint32(@buffer[0]), 0, 1024);