am b4819e4a: Merge "init: support longer command lines"
* commit 'b4819e4adaee86884725754d4966c7b78a61fb11':
init: support longer command lines
diff --git a/init/util.c b/init/util.c
index 154bb2d..078b99b 100644
--- a/init/util.c
+++ b/init/util.c
@@ -450,13 +450,13 @@
void import_kernel_cmdline(int in_qemu,
void (*import_kernel_nv)(char *name, int in_qemu))
{
- char cmdline[1024];
+ char cmdline[2048];
char *ptr;
int fd;
fd = open("/proc/cmdline", O_RDONLY);
if (fd >= 0) {
- int n = read(fd, cmdline, 1023);
+ int n = read(fd, cmdline, sizeof(cmdline) - 1);
if (n < 0) n = 0;
/* get rid of trailing newline, it happens */