mirror of
https://git.shadowkat.net/izaya/OC-PsychOS2.git
synced 2024-11-22 03:54:20 -05:00
fix support for booting from rtfs on tape
This commit is contained in:
parent
ff7ec50a94
commit
429c9e2aa7
@ -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")
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user