Messages in this thread Patch in this message |  | | Date | Mon, 10 Oct 2005 20:24:43 +0200 | | From | Alon Bar-Lev <> | | Subject | Re: [PATCH 1/1] 2.6.14-rc3 x86: COMMAND_LINE_SIZE |
| |
Georg Lippold wrote: > H. Peter Anvin wrote on Mon, Oct 10, 2005 at 08:49:04AM -0700: > >>I would suggest updating your patch to include x86-64 and documentation,
Hi!
Just a few suggestions...
1. The old protocol must stay with 255 + null command line... I suggest:
For boot protocol <2.02, the kernel command line is a null-terminated string up to 255 characters long, plus the final null. For boot protocol >=2.02 command line that is referred by cmd_line_ptr is null-terminated string, the kernel will truncate this string if it is too large to handle.
2. I suggest adding a new configuration to set the size of command-line, so it won't be hard coded...
Add CONFIG_CMD_LINE_SIZE with default of 1024.
I've done this by init/Kconfig...
--- Kconfig 2005-10-10 20:16:14.000000000 +0200 +++ Kconfig.org 2005-10-10 20:14:13.000000000 +0200 @@ -77,13 +77,6 @@ config LOCALVERSION object and source tree, in that order. Your total string can be a maximum of 64 characters.
+config CMD_LINE_SIZE + integer "Set maximum command line size" + default 1024 + help + This option allows you to specify the maximum kernel command + line arguments. + config SWAP bool "Support for paging of anonymous memory (swap)" depends on MMU
3. Set the COMMAND_LINE_SIZE to CONFIG_CMD_LINE_SIZE
I've found that not all files that includes setup.h and param.h include config.h... So I've written:
#if defined(CONFIG_CMD_LINE_SIZE) #define COMMAND_LINE_SIZE CONFIG_CMD_LINE_SIZE #endif
So that it fails if you try to use COMMAND_LINE_SIZE and did not include config.h, another alternative is to include config.h in these include files... I don't know what the conventions are.
Best Regards, Alon Bar-Lev. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |