Merge branch 'feature/vfs' into 'develop'
Added comments to init() See merge request spexeah/asuro!3
This commit is contained in:
commit
32565989ff
@ -707,11 +707,6 @@ end;
|
|||||||
|
|
||||||
{ Init }
|
{ Init }
|
||||||
|
|
||||||
function fake_drive_path_valid(Handle : uint32; Path : pchar) : TIsPathValid;
|
|
||||||
begin
|
|
||||||
fake_drive_path_valid:= pvDirectory;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure init();
|
procedure init();
|
||||||
var
|
var
|
||||||
ht : PHashMap;
|
ht : PHashMap;
|
||||||
@ -721,16 +716,21 @@ var
|
|||||||
begin
|
begin
|
||||||
tracer.push_trace('vfs.init.enter');
|
tracer.push_trace('vfs.init.enter');
|
||||||
|
|
||||||
|
{ VFS Root Creation }
|
||||||
Root:= createVirtualDirectory();
|
Root:= createVirtualDirectory();
|
||||||
Root^.Parent:= nil;
|
Root^.Parent:= nil;
|
||||||
Root^.ObjectName:= stringCopy('/');
|
Root^.ObjectName:= stringCopy('/');
|
||||||
|
|
||||||
|
{ Init Push/Pop Stack for PUSHD & POPD }
|
||||||
PushPopDirectory:= STRLL_New;
|
PushPopDirectory:= STRLL_New;
|
||||||
|
|
||||||
|
{ Move to root of VFS }
|
||||||
ChangeCurrentDirectoryValue('/');
|
ChangeCurrentDirectoryValue('/');
|
||||||
|
|
||||||
|
{ Create the Default VFS Directories }
|
||||||
newVirtualDirectory('/dev');
|
newVirtualDirectory('/dev');
|
||||||
newVirtualDirectory('/disk');
|
newVirtualDirectory('/disk');
|
||||||
|
newVirtualDirectory('/cfg');
|
||||||
|
|
||||||
// rel:= makeRelative('/disk/SDA/mydirectory/myfile', '/disk/SDA');
|
// rel:= makeRelative('/disk/SDA/mydirectory/myfile', '/disk/SDA');
|
||||||
// if rel <> nil then outputln('VFS', rel) else outputln('VFS', 'REL IS NULL!');
|
// if rel <> nil then outputln('VFS', rel) else outputln('VFS', 'REL IS NULL!');
|
||||||
@ -738,6 +738,7 @@ begin
|
|||||||
//outputln('VFS', makeRelative('/test/mydisk/mything', '/test/mydisk'));
|
//outputln('VFS', makeRelative('/test/mydisk/mything', '/test/mydisk'));
|
||||||
//while true do begin end;
|
//while true do begin end;
|
||||||
|
|
||||||
|
{ Register Terminal Commands }
|
||||||
terminal.registerCommand('LS', @VFS_COMMAND_LS, 'List directory contents.');
|
terminal.registerCommand('LS', @VFS_COMMAND_LS, 'List directory contents.');
|
||||||
terminal.registerCommand('CD', @VFS_COMMAND_CD, 'Set working directory.');
|
terminal.registerCommand('CD', @VFS_COMMAND_CD, 'Set working directory.');
|
||||||
terminal.registerCommand('PUSHD', @VFS_COMMAND_PUSHD, 'Push the working directory.');
|
terminal.registerCommand('PUSHD', @VFS_COMMAND_PUSHD, 'Push the working directory.');
|
||||||
@ -753,7 +754,7 @@ begin
|
|||||||
//hashmap.add(ht, 'File', void(newDummyObject(otFILE)));}
|
//hashmap.add(ht, 'File', void(newDummyObject(otFILE)));}
|
||||||
//otVDIRECTORY, otDRIVE, otDEVICE, otVFILE, otMOUNT, otDIRECTORY, otFILE)
|
//otVDIRECTORY, otDRIVE, otDEVICE, otVFILE, otMOUNT, otDIRECTORY, otFILE)
|
||||||
|
|
||||||
registerDrive(1337, 'TestDrive', nil, nil, nil, nil, nil, nil, nil, @fake_drive_path_valid);
|
//registerDrive(1337, 'TestDrive', nil, nil, nil, nil, nil, nil, nil, @fake_drive_path_valid);
|
||||||
|
|
||||||
tracer.push_trace('vfs.init.exit');
|
tracer.push_trace('vfs.init.exit');
|
||||||
end;
|
end;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user