git-svn-id: https://spexeah.com:8443/svn/Asuro@424 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c

This commit is contained in:
aaron 2018-04-09 15:29:57 +00:00
parent 8e91ed30ac
commit 59e2d9c4ad
2 changed files with 21 additions and 16 deletions

View File

@ -18,7 +18,8 @@ uses
terminal,
drivermanagement,
vmemorymanager,
lmemorymanager;
lmemorymanager,
strings;
type
@ -27,7 +28,6 @@ type
PPIOHook = procedure(volume : PStorage_volume; directory : pchar; byteCount : uint32; buffer : puint32);
TFilesystem = record
idx : uint8;
sName : pchar;
writeCallback : PPIOHook;
readCallback : PPIOHook;
@ -39,6 +39,7 @@ type
sectorSize : uint32;
filesystem : TFilesystem;
end;
APStorage_Volume = array[0..255] of PStorage_volume;
TStorage_Device = record
idx : uint8;
@ -73,6 +74,7 @@ procedure disk_command(params : PParamList);
var
i : uint8;
begin
if stringEquals(getParam(1, params), 'ls') then begin
for i:=0 to 255 do begin
if storageDevices[i].maxSectorCount = 0 then break;
console.writeint(i);
@ -88,10 +90,11 @@ begin
console.writestringln('MB');
end;
end;
end;
procedure init();
begin
terminal.registerCommand('disk', @disk_command, 'List storage devices');
terminal.registerCommand('DISK', @disk_command, 'List physical storage devices');
end;
procedure register_device(device : TStorage_Device);

View File

@ -36,7 +36,8 @@ uses
testdriver,
E1000,
AHCI_OLD,
IDE;
IDE,
storagemanagement;
procedure kmain(mbinfo: Pmultiboot_info_t; mbmagic: uint32); stdcall;
@ -94,6 +95,7 @@ begin
terminal.registerCommand('BSOD', @terminal_command_bsod, 'Force a Panic Screen.');
drivermanagement.init();
storagemanagement.init();
console.init();