This is an old revision of the document!
July 20: More comments today. Got some feedback from Stefan about the [[http://git.etherboot.org/?p=people/lynusvaz/gpxe.git;a=commit;h=659fe70546bd279d8e90413b0896950fa7e02361|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.