[syslinux] NEW: COM32 module to alias

Gene Cumm gene.cumm at gmail.com
Wed Oct 22 20:00:20 PDT 2008


On Wed, Oct 22, 2008 at 10:38 PM, Gene Cumm <gene.cumm at gmail.com> wrote:
> On Wed, Oct 22, 2008 at 8:28 PM, H. Peter Anvin <hpa at zytor.com> wrote:
>> H. Peter Anvin wrote:
>>>
>>> Currently both Syslinux and the Linux kernel has a limit of 2047
>>> characters (not including the final null.)
>>>
>>
>> com32/menu/menu.h has the definition:
>>
>> #define MAX_CMDLINE_LEN        2048
>>
>> This really should move into <syslinux/boot.h>.
>>
>>        -hpa
>
> Thanks for the quick response.  It saves me from having to search for
> it.  If I recall correctly, it was defined as 256 but I think that was
> quite some time ago and I think I recall reading about it when the
> discussion on expanding it occurred.  I've included it by reference
> (if defined), otherwise statically as 2048.
>
> Searching in /usr/include on my Linux system yields 3 potential macro
> names, _POSIX2_LINE_MAX, LINE_MAX, and COMMAND_LINE_SIZE (only in
> <asm/setup.h>) of which LINE_MAX seems the most appropriate but I'm
> uncertain.  Including <limits.h> on my system, defines LINE_MAX and
> _POSIX2_LINE_MAX.  Would it be more appropriate to have the macro in
> <syslinux/boot.h> or <limits.h>?

Searching quickly in the headers for my kernel, I think I found the
macro that defines it for the Linux kernel.  It appears to be
COMMAND_LINE_SIZE, if my quick search and analysis is correct(in
<asm-[ARCH]/setup.h and is defined as different values depending on
architecture but only x86 and x64 are relevant and are currently 2048
as you stated).  Based on this, it seems that the COMMAND_LINE_SIZE
macro might be the most appropriate as it is already the macro name
used in the kernel.  It seems that LINE_MAX and _POSIX2_LINE_MAX are
more appropriate in general purpose Unix shell command lines (like
bash, ash, tcsh, etc).




More information about the Syslinux mailing list