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