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

This commit is contained in:
aaron committed 2018-04-08 03:35:05 +00:00
1 parent e4ed0cf1cf
commit 6355e94458
2 files changed
+84 -20

No files matched your search

File diff suppressed because it is too large. Load diff
+5 -5
View File
@@ -30,12 +30,12 @@ type
controller : TControllerType; controller : TControllerType;
controllerId0 : uint32; controllerId0 : uint32;
maxSectorCount : uint32; maxSectorCount : uint32;
usedSectorCount : uint32; sectorSize : uint32;
end; end;
var var
storageDevices : array[0..255] of TStorage_Device; storageDevices : array[0..255] of TStorage_Device; //index in this array is global drive id
//TODO need callback things for when new devices are connected //TODO need callback things for when new devices are connected
procedure init(); procedure init();
@@ -46,7 +46,7 @@ procedure register_device(device : TStorage_Device);
implementation implementation
procedure list_drives_command(params : PParamList); procedure disk_command(params : PParamList);
var var
i : uint8; i : uint8;
begin begin
@@ -61,14 +61,14 @@ begin
ControllerNET : console.writestring('NET, '); ControllerNET : console.writestring('NET, ');
end; end;
console.writestring('Capacity: '); console.writestring('Capacity: ');
console.writeint(((storageDevices[i].maxSectorCount * 512) DIV 1000) DIV 1000); console.writeint(((storageDevices[i].maxSectorCount * storageDevices[i].sectorSize) DIV 1000) DIV 1000);
console.writestringln('MB'); console.writestringln('MB');
end; end;
end; end;
procedure init(); procedure init();
begin begin
terminal.registerCommand('disks', @list_drives_command, 'List storage devices'); terminal.registerCommand('disk', @disk_command, 'List storage devices');
end; end;
procedure register_device(device : TStorage_Device); procedure register_device(device : TStorage_Device);