Date: Mon, 5 Jan 2009 20:09:54 +0000 (UTC) From: Luigi Rizzo <luigi@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/sys/boot/forth loader.4th pnp.4th support.4th Message-ID: <200901052010.n05KADDw072298@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
luigi 2009-01-05 20:09:54 UTC
FreeBSD src repository
Modified files:
sys/boot/forth loader.4th pnp.4th support.4th
Log:
SVN rev 186789 on 2009-01-05 20:09:54Z by luigi
This patch introduces a number of simplifications to the Forth
functions used in the bootloader. The goal is to make the code more
readable and smaller (especially because we have size issues
in the loader's environment).
High level description of the changes:
+ define some string manipulation functions to improve readability;
+ create functions to manipulate module descriptors, removing some
duplicated code;
+ rename the error codes to ESOMETHING;
+ consistently use set_environment_variable (which evaluates
$variables) when interpreting variable=value assignments;
I have tested the code, but there might be code paths that I have
not traversed so please let me know of any issues.
Details of this change:
--- loader.4th ---
+ add some module operators, to remove duplicated code while parsing
module-related commands:
set-module-flag
enable-module
disable-module
toggle-module
show-module
--- pnp.4th ---
+ move here the definition related to the pnp devices list, e.g.
STAILQ_* , pnpident, pnpinfo
--- support.4th ---
+ rename error codes to capital e.g. ENOMEM EFREE ... and do obvious
changes related to the renaming;
+ remove unused structures (those relevant to pnp are moved to pnp.4th)
+ various string functions
- strlen removed (it is an internal function)
- strchr, defined as the C function
- strtype -- type a string to output
- strref -- assign a reference to the string on the stack
- unquote -- remove quotes from a string
+ remove reset_line_buffer
+ move up the 'set_environment_variable' function (which now
uses the interpreter, so $variables are evaluated).
Use the function in various places
+ add a 'test_file function' for debugging purposes
MFC after: 4 weeks
Revision Changes Path
1.26 +12 -96 src/sys/boot/forth/loader.4th
1.3 +33 -0 src/sys/boot/forth/pnp.4th
1.19 +268 -413 src/sys/boot/forth/support.4th
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901052010.n05KADDw072298>
