added ps
This commit is contained in:
@@ -29,6 +29,7 @@ while true do
|
||||
if not ok then
|
||||
print(err)
|
||||
end
|
||||
printInline("> ")
|
||||
stopInput=false
|
||||
str=""
|
||||
end
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
for i,v in ipairs(syscall.getTasks()) do
|
||||
local task = syscall.getTask(v)
|
||||
print(task.pid,task.username,task.name,task.status)
|
||||
end
|
||||
@@ -80,7 +80,7 @@ end
|
||||
function table.hasKey(tabl, query)
|
||||
for i,v in pairs(tabl) do
|
||||
if i==query then
|
||||
return true
|
||||
return v
|
||||
end
|
||||
end
|
||||
return false
|
||||
@@ -89,7 +89,7 @@ end
|
||||
function table.hasVal(tabl, query)
|
||||
for i,v in pairs(tabl) do
|
||||
if v==query then
|
||||
return true
|
||||
return i
|
||||
end
|
||||
end
|
||||
return false
|
||||
|
||||
@@ -406,7 +406,11 @@ function vfs.listdir(path)
|
||||
if disk:type(diskPath) ~= "directory" then error("ENOTDIR") end
|
||||
local meta = getFileMeta(path)
|
||||
checkperms(meta, "r")
|
||||
return disk:list(diskPath)
|
||||
local list = disk:list(diskPath)
|
||||
if table.indexOf(list,".meta")~=-1 then
|
||||
table.remove(list,table.indexOf(list,".meta"))
|
||||
end
|
||||
return list
|
||||
end
|
||||
|
||||
function vfs.mkdir(path)
|
||||
|
||||
@@ -180,7 +180,7 @@ end
|
||||
function sys.getTasks()
|
||||
local ret={}
|
||||
for i,v in pairs(tasks) do
|
||||
ret[i]=v.pid
|
||||
ret[#ret+1]=v.pid
|
||||
end
|
||||
return ret
|
||||
end
|
||||
|
||||
0
Src/Hyperion-spm/bin/spm
Normal file
0
Src/Hyperion-spm/bin/spm
Normal file
Reference in New Issue
Block a user