From fa877515ee56ce034ee8ae0d37994d9c6957e5ad Mon Sep 17 00:00:00 2001 From: Will Woods Date: Thu, 13 Nov 2008 00:59:43 +0000 Subject: [PATCH] long append="..." causes yaboot to reject entire yaboot.conf (MAX_TOKEN too small) yaboot's second/cfg.c has: #define MAX_TOKEN 200 When yaboot parses its config file, if it encounters a quoted string (like append="...") longer than MAX_TOKEN, it rejects the entire config. Typical preupgrade usage uses ~250 chars, which means preupgrade currently renders ppc systems unbootable without this patch. Suggest increasing MAX_TOKEN to.. let's say 511. cfg.c does "char buf[MAX_TOKEN+1]", and everyone loves powers of 2. Signed-off-by: Roman Rakus Signed-off-by: Tony Breeds --- second/cfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/second/cfg.c b/second/cfg.c index fe3f1e1..f23e690 100644 --- a/second/cfg.c +++ b/second/cfg.c @@ -41,7 +41,7 @@ typedef struct { void *data; } CONFIG; -#define MAX_TOKEN 200 +#define MAX_TOKEN 511 #define MAX_VAR_NAME MAX_TOKEN #define EOF -1 -- 2.39.2