July 20: More comments today. Got some feedback from Stefan about the quotes patch. Also added the automated test to the same patch. Decided to have a look at the sizes before and after the quoting (make bin/rtl8139.dsk.sizes): Before
text data bss dec hex filename 629 8 0 637 27d bin/exec.o 321 16 4 341 155 bin/shell.o
After:
text data bss dec hex filename 629 8 0 637 27d bin/exec.o 335 16 4 355 163 bin/shell.o 954 0 0 954 3ba bin/parse.o
and for bin/rtl8139.rom: Before: 55808, After: 55808
July 21-24: Had some problems with the gen_stack: the expand_command() function made a new stack, stored the arguments in that and copied the contents into the passed stack. So, I've now defined gen_stack as a struct:
struct gen_stack { void *ptr; int count; }; #define VAR_STACK( name ) _##name #define INIT_STACK( name ) { VAR_STACK ( name ), -1 } #define STACK( name, type, size ) \ typeof ( type ) VAR_STACK ( name )[size]; \ struct gen_stack name = INIT_STACK ( name );
So, when a stack is defined:
STACK ( my_stack, int, 10);
becomes:
typeof ( int ) _my_stack[10]; struct gen_stack my_stack = { _my_stack, -1 };;
This means that a gen_stack can be passed as a single entity to functions. Also, am using a struct string to store the complete command. This allows me to reduce the size of the system() function slightly.
577 8 4 589 24d bin/exec.o 335 16 4 355 163 bin/shell.o 954 0 0 954 3ba bin/parse.o
Sent in the modifications to etherboot-developers today.
July 25: Had the weekly meeting today. Things to do for next week: documentation of scripting changes, and sending in the next patch, which is the arithmetic parser. Decided to also start on writing an autoboot script, which will implement the current autoboot procedure, in a script. This could serve as a useful example. Now, an interesting part of the autoboot process is the PXE menu. There are some DHCP settings that need to be checked for that.
July 26: Prepared the arithmetic parser for the next patch: Arithmetic parser Also reading up on the PXE menu.