From 387daea7f281c18390fe0982ea225dd4504aa319 Mon Sep 17 00:00:00 2001 From: cinder <> Date: Thu, 4 Apr 2024 01:10:35 -0700 Subject: [PATCH] boot.lua: polyfill computer.{get,set}BootAddress --- boot.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/boot.lua b/boot.lua index fd46a9d..05842ff 100644 --- a/boot.lua +++ b/boot.lua @@ -34,6 +34,16 @@ else bootfs = data end +--polyfill {get,set}BootAddress like normal bios does +--they should exist! +--normal lua bios says it provides {get,set}BootAddress for "backwards compatibility", but there's no replacement +function computer.getBootAddress() + return ci(eeprom, 'getData') +end +function computer.setBootAddress(addr) + return ci(eeprom, 'setData', addr) +end + local fd, err = ci(bootfs, 'open', '/init.lua') if not fd then bail('open %s/init.lua failed: %s', bootfs:sub(1, 8), err) end local code = ''