1
1
mirror of https://git.shadowkat.net/izaya/OC-PsychOS2.git synced 2024-11-21 19:44:21 -05:00

Compare commits

..

3 Commits

Author SHA1 Message Date
XeonSquared
82decfabf9 pkgman updates to simplify distribution with different kernels 2023-08-05 16:22:59 +10:00
XeonSquared
ae41cc48dd fix tabs 2023-08-05 15:15:03 +10:00
XeonSquared
429c9e2aa7 fix support for booting from rtfs on tape 2023-08-05 10:06:05 +10:00
5 changed files with 6 additions and 5 deletions

View File

@ -1 +0,0 @@
{enabled={"getty","minitel","fsmanager"}}

View File

@ -30,7 +30,7 @@ function mtar.iter(stream) -- table -- function -- Given buffer *stream*, return
end end
return function() return function()
while remain > 0 do while remain > 0 do
remain=remain-#stream:read(math.min(remain,2048)) remain=remain-(#stream:read(math.min(remain,2048)) or "")
end end
local version = 0 local version = 0
local nlen = string.unpack(">I2", stream:read(2) or "\0\0") local nlen = string.unpack(">I2", stream:read(2) or "\0\0")

View File

@ -10,6 +10,8 @@ if not w then lz16 = nil end
fs.makeDirectory("/boot/pkg") fs.makeDirectory("/boot/pkg")
fs.makeDirectory("/boot/cfg/pkg") fs.makeDirectory("/boot/cfg/pkg")
require "pkgfs" require "pkgfs"
local kver,kvar = _OSVERSION:match("(%x+)%-([^-]-)$")
kver,kvar = kver or "unknown", kvar or "base"
local function getSources() local function getSources()
local f = io.open(pkg.sourcePath,"rb") local f = io.open(pkg.sourcePath,"rb")
@ -27,7 +29,7 @@ end
local function getInstalled() local function getInstalled()
local f = io.open(pkg.installedPath,"rb") local f = io.open(pkg.installedPath,"rb")
if not f then return {} end if not f then return {psychos={version=kver},["kernel-"..kvar]={version=kver}} end
local c = f:read("*a") local c = f:read("*a")
f:close() f:close()
return serial.unserialize(c) return serial.unserialize(c)

View File

@ -98,7 +98,7 @@ function vtansi.vtemu(gpu,bn) -- table number -- function -- takes GPU component
cx,cy = 1, cy+1 cx,cy = 1, cy+1
checkCursor() checkCursor()
elseif cc == "\t" then elseif cc == "\t" then
wb=wb..(" "):rep(8*((cx+9)//8)) wb=wb..(" "):rep((((cx//8)+1) * 8) - cx + 1)
elseif cc == "\27" then elseif cc == "\27" then
flushwb() flushwb()
mode = 1 mode = 1

View File

@ -2,7 +2,7 @@
--#includepkglib "rtfs" "lib/rtfs.lua" "rtfs" --#includepkglib "rtfs" "lib/rtfs.lua" "rtfs"
do do
local a = computer.getBootAddress() local a = computer.getBootAddress()
if component.type(a) == "drive" then if component.type(a) == "drive" or component.type(a) == "tape_drive" then
local diskpart = require "diskpart" local diskpart = require "diskpart"
for k,v in ipairs(diskpart.getPartitions(a)) do for k,v in ipairs(diskpart.getPartitions(a)) do
if v[2] == "rtfs" and v[1] == computer.address():sub(1,8) .. "-boot" then if v[2] == "rtfs" and v[1] == computer.address():sub(1,8) .. "-boot" then