1
0
mirror of https://github.com/20kdc/OC-KittenOS.git synced 2024-11-27 04:48:05 +11:00

Add stubs for app-metamachine getDeviceInfo/setArchitecture/getArchitecture, add some debug for missing methods (plan9k vm fix)

This commit is contained in:
20kdc 2018-10-11 17:40:54 +01:00
parent 630c5f57f5
commit 916d127337
2 changed files with 53 additions and 3 deletions

View File

@ -126,7 +126,7 @@ return {
},
["app-metamachine"] = {
desc = "Virtual machine",
v = 3,
v = 4,
deps = {
"neo",
"zzz-license-pd"

View File

@ -65,6 +65,7 @@ local screensAll = {
local tmpAddress = "k-tmpfs"
local passthroughs = {}
local fakeArch = _VERSION
local components = {
["k-computer"] = {
type = "computer",
@ -83,6 +84,55 @@ local components = {
getProgramLocations = function ()
-- Entries of {"file", "lootdisk"}
return {}
end,
getDeviceInfo = function ()
return {
["k-computer"] = {
["class"] = "system",
["description"] = "Computer",
["product"] = "Freeziflow Liquid-Cooling Unit",
["vendor"] = "KDC Subsystems",
["capacity"] = "10",
["width"] = "",
["clock"] = ""
},
["k-processor"] = {
["class"] = "processor",
["description"] = "CPU",
["product"] = "Celesti4 Quantum Computing System",
["vendor"] = "KDC Subsystems",
["capacity"] = "",
["width"] = "",
["clock"] = "9000"
},
["k-memory"] = {
["class"] = "memory",
["description"] = "Memory bank",
["product"] = "Lun4 Paging Subsystem",
["vendor"] = "KDC Subsystems",
["capacity"] = "",
["width"] = "",
["clock"] = "9000"
},
["k-gpu"] = {
["class"] = "display",
["description"] = "Graphics controller",
["product"] = "Tw1-l GPU Multiplexer",
["vendor"] = "KDC Subsystems",
["capacity"] = "8000",
["width"] = "8",
["clock"] = "9000"
}
}
end,
getArchitectures = function ()
return {fakeArch}
end,
setArchitecture = function (a)
fakeArch = a
end,
getArchitecture = function ()
return fakeArch
end
},
["k-gpu"] = libVGPU.newGPU(screensAll),
@ -124,8 +174,8 @@ vmComponent = {
return tk
end,
invoke = function (com, me, ...)
if not components[com] then error("no such component") end
if not components[com][me] then error("no such method") end
if not components[com] then error("no such component " .. com) end
if not components[com][me] then error("no such method " .. com .. "." .. me) end
return components[com][me](...)
end,
proxy = function (com)