Hollis Blanchard <[EMAIL PROTECTED]> writes: > On Tue, 2006-10-10 at 11:08 +0800, Jeff Chua wrote: >> On Mon, 9 Oct 2006, Hollis Blanchard wrote: >> >> >> +#include <asm/param.h> >> > >> > I don't think this is a good idea because it requires we build on a >> > Linux host. >> >> Shall I use '#ifdef __linux__' to include <asm/param.h> only on linux, and >> '#define COMMAND_LINE_SIZE 255' for non-linux system? > > Well, does this number change often? If not, let's just copy it. > > If so, then we're screwed anyways because asm/param.h would only match > the installed kernel's limit, so may not work for other kernel versions. > In that case, let's just copy it and shrink it in a "lowest common > denominator" approach.
Isn't it possible to use the kernel binary to determine this? For example, is the maximum commandline size stored somewhere? Perhaps, we can determine it by looking at some version field? According to the documentation it is has a maximum length of 255 bytes for every Linux version: "The kernel command line is a null-terminated string up to 255 characters long, plus the final null." I don't want the loader to rely on being compiled on GNU/Linux. GRUB 2, when compiled on *BSD, should be capable of loading Linux just as GRUB 2 compiled on GNU/Linux would. -- Marco _______________________________________________ Grub-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/grub-devel
