[syslinux] Accessing command_line from core C code

H. Peter Anvin hpa at zytor.com
Thu Jul 15 22:08:49 PDT 2010


On 07/15/2010 03:02 PM, Sebastian Herbszt wrote:
> I tried to replace display_labels asm code (ui.inc) with new C code
> (pm_display_labels),
> but the data i access in command_line doesn't seem to be always up to date.
> The patch i am working on is only for PXELINUX because of different
> vkernel structure:

I would really like to get rid of the entire ui.inc (actually the rest
of the assembly core, too) and have it replaced with C code... a lot of
work in that direction has already happened of the "elflink" branch
(Syslinux 5).  On the other hand, perhaps an incremental approach is
useful, too.

I think the part you're missing is that command_line is not guaranteed
to be zero-terminated during editing.  The assembly code uses register
DI to keep track of the end of the command line; it does zero-terminate
the string when it is complete, however.

	-hpa


-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.




More information about the Syslinux mailing list