core.lua (a108046f58d0db8e2c67318282eb7509931a980f) core.lua (fa4a2394a76aadd0702ff5b7eeb7387b678b34a8)
1--
2-- Copyright (c) 2015 Pedro Souza <pedrosouza@freebsd.org>
3-- All rights reserved.
4--
5-- Redistribution and use in source and binary forms, with or without
6-- modification, are permitted provided that the following conditions
7-- are met:
8-- 1. Redistributions of source code must retain the above copyright

--- 12 unchanged lines hidden (view full) ---

21-- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22-- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23-- OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24-- SUCH DAMAGE.
25--
26-- $FreeBSD$
27--
28
1--
2-- Copyright (c) 2015 Pedro Souza <pedrosouza@freebsd.org>
3-- All rights reserved.
4--
5-- Redistribution and use in source and binary forms, with or without
6-- modification, are permitted provided that the following conditions
7-- are met:
8-- 1. Redistributions of source code must retain the above copyright

--- 12 unchanged lines hidden (view full) ---

21-- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22-- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23-- OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24-- SUCH DAMAGE.
25--
26-- $FreeBSD$
27--
28
29local config = require('config');
30
29local core = {};
30
31-- Commonly appearing constants
32core.KEY_BACKSPACE = 8;
33core.KEY_ENTER = 13;
34core.KEY_DELETE = 127;
35
36core.KEYSTR_ESCAPE = "\027";

--- 138 unchanged lines hidden (view full) ---

175function core.setDefaults()
176 core.setACPI(core.getACPIPresent(true));
177 core.setSafeMode(false);
178 core.setSingleUser(false);
179 core.setVerbose(false);
180end
181
182function core.autoboot()
31local core = {};
32
33-- Commonly appearing constants
34core.KEY_BACKSPACE = 8;
35core.KEY_ENTER = 13;
36core.KEY_DELETE = 127;
37
38core.KEYSTR_ESCAPE = "\027";

--- 138 unchanged lines hidden (view full) ---

177function core.setDefaults()
178 core.setACPI(core.getACPIPresent(true));
179 core.setSafeMode(false);
180 core.setSingleUser(false);
181 core.setVerbose(false);
182end
183
184function core.autoboot()
185 config.loadelf();
183 loader.perform("autoboot");
184end
185
186function core.boot()
186 loader.perform("autoboot");
187end
188
189function core.boot()
190 config.loadelf();
187 loader.perform("boot");
188end
189
190function core.bootserial()
191 local c = loader.getenv("console");
192
193 if (c ~= nil) then
194 if (c:find("comconsole") ~= nil) then

--- 18 unchanged lines hidden ---
191 loader.perform("boot");
192end
193
194function core.bootserial()
195 local c = loader.getenv("console");
196
197 if (c ~= nil) then
198 if (c:find("comconsole") ~= nil) then

--- 18 unchanged lines hidden ---