Compare commits
No commits in common. "b3aa15b5804f0a32360e6f1d0d0fce13e66cd34f" and "787163c606dcfadd0e8fef97c7339e9775e4fe4b" have entirely different histories.
b3aa15b580
...
787163c606
2
build.sh
2
build.sh
@ -7,5 +7,5 @@ echo _OSVERSION=\"PsychOS 2.0a1-$(git rev-parse --short HEAD)\" > target/version
|
||||
cat target/version.lua target/init.lua > target/tinit.lua
|
||||
mv target/tinit.lua target/init.lua
|
||||
cp -r exec/ service/ lib/ target/
|
||||
cp default-init.txt target/cfg/init.txt
|
||||
cp default-init.txt target/cfg/
|
||||
lua finddesc.lua $(find module/ -type f) $(find lib/ -type f) > apidoc.md
|
||||
|
@ -1,2 +1,2 @@
|
||||
print("Total Used Free")
|
||||
print(string.format("%4iK %4iK %4iK",math.floor(computer.totalMemory()/1024),math.floor((computer.totalMemory()-computer.freeMemory())/1024),math.floor(computer.freeMemory()/1024)))
|
||||
print(string.format("%4dK %4dK %4dK",computer.totalMemory()/1024,math.floor((computer.totalMemory()-computer.freeMemory())/1024),math.floor(computer.freeMemory()/1024)))
|
||||
|
@ -4,14 +4,6 @@ end
|
||||
os.setenv("PWD","/boot")
|
||||
io.input("/dev/null")
|
||||
io.output("/dev/syslog")
|
||||
local f = io.open("/boot/cfg/hostname","rb")
|
||||
local hostname = computer.address():sub(1,8)
|
||||
if f then
|
||||
hostname = f:read("*l")
|
||||
f:close()
|
||||
end
|
||||
os.setenv("HOSTNAME",hostname)
|
||||
syslog(string.format("Hostname set to %s",hostname))
|
||||
local pids = {}
|
||||
local function loadlist()
|
||||
local f = io.open("/boot/cfg/init.txt","rb")
|
||||
|
@ -42,16 +42,6 @@ local function fread(self,length)
|
||||
rstr = rstr .. lstr
|
||||
until rstr:len() == length or lstr == ""
|
||||
return rstr
|
||||
elseif type(length) == "string" then
|
||||
local buf = ""
|
||||
if length == "*l" then
|
||||
length = "\n"
|
||||
end
|
||||
repeat
|
||||
local rb = fsmounts[self.fs].read(self.fid,1) or ""
|
||||
buf = buf .. rb
|
||||
until buf:match(length) or rb == ""
|
||||
return buf:match("(.*)"..length)
|
||||
end
|
||||
return fsmounts[self.fs].read(self.fid,length)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user