diff -Naur busybox.orig/util-linux/fbset.c busybox/util-linux/fbset.c
--- busybox.orig/util-linux/fbset.c	2008-07-31 18:34:22 +0000
+++ busybox/util-linux/fbset.c	2008-08-18 13:37:50 +0000
@@ -171,80 +171,92 @@
 #endif
 
 #if ENABLE_FEATURE_FBSET_READMODE
-static void ss(uint32_t *x, uint32_t flag, char *buf, const char *what)
+static FAST_FUNC void ss(uint32_t *x, uint32_t flag, char *buf, const char *what)
 {
-	if (strstr(buf, what))
+	if (strcmp(buf, what) == 0)
 		*x &= ~flag;
 	else
 		*x |= flag;
 }
 
-static int readmode(struct fb_var_screeninfo *base, const char *fn,
+static FAST_FUNC int readmode(struct fb_var_screeninfo *base, const char *fn,
 					const char *mode)
 {
-	FILE *f;
-	char buf[256];
-	char *p = buf;
-
-	f = xfopen_for_read(fn);
-	while (fgets(buf, sizeof(buf), f)) {
-		p = strstr(buf, "mode ");
-		if (!p && !(p = strstr(buf, "mode\t")))
+	char *token[2], *p, *s;
+	parser_t *parser = config_open(fn);
+	while (config_read(parser, token, 2, 1, "# \t\r", PARSE_NORMAL)) {
+		if (strcmp(token[0], "mode") != 0 || !token[1])
 			continue;
-		p = strstr(p + 5, mode);
+		p = strstr(token[1], mode);
 		if (!p)
 			continue;
-		p += strlen(mode);
-		if (!isspace(*p) && (*p != 0) && (*p != '"')
-		 && (*p != '\r') && (*p != '\n')
+		s = p+strlen(mode);
+		//bb_info_msg("CHECK[%s][%s][%d]", mode, p-1, *s);
+		// exact match?
+		if (((!*s || isspace(*s)) && '"' != s[-1]) // end-of-token
+			|| ('"' == *s && '"' == p[-1]) // ends with " but starts with " too!
 		) {
-			continue;	/* almost, but not quite */
+			//bb_info_msg("FOUND[%s][%s][%s][%d]", token[1], p, mode, isspace(*s));
+			break;
 		}
+	}
 
-		while (fgets(buf, sizeof(buf), f)) {
-			if ((p = strstr(buf, "geometry "))) {
-				p += 9;
-				/* FIXME: catastrophic on arches with 64bit ints */
-				sscanf(p, "%d %d %d %d %d",
-					&(base->xres), &(base->yres),
-					&(base->xres_virtual), &(base->yres_virtual),
-					&(base->bits_per_pixel));
-			} else if ((p = strstr(buf, "timings "))) {
-				p += 8;
-				sscanf(p, "%d %d %d %d %d %d %d",
-					&(base->pixclock),
-					&(base->left_margin), &(base->right_margin),
-					&(base->upper_margin), &(base->lower_margin),
-					&(base->hsync_len), &(base->vsync_len));
-			} else if ((p = strstr(buf, "laced "))) {
-				//p += 6;
-				ss(&base->vmode, FB_VMODE_INTERLACED, buf, "false");
-			} else if ((p = strstr(buf, "double "))) {
-				//p += 7;
-				ss(&base->vmode, FB_VMODE_DOUBLE, buf, "false");
-			} else if ((p = strstr(buf, "vsync "))) {
-				//p += 6;
-				ss(&base->sync, FB_SYNC_VERT_HIGH_ACT, buf, "low");
-			} else if ((p = strstr(buf, "hsync "))) {
-				//p += 6;
-				ss(&base->sync, FB_SYNC_HOR_HIGH_ACT, buf, "low");
-			} else if ((p = strstr(buf, "csync "))) {
-				//p += 6;
-				ss(&base->sync, FB_SYNC_COMP_HIGH_ACT, buf, "low");
-			} else if ((p = strstr(buf, "extsync "))) {
-				//p += 8;
-				ss(&base->sync, FB_SYNC_EXT, buf, "false");
-			}
+	if (!token[0])
+		return 0;
 
-			if (strstr(buf, "endmode"))
-				return 1;
+	while (config_read(parser, token, 2, 1, "# \t", PARSE_NORMAL)) {
+		int i;
+//bb_info_msg("???[%s][%s]", token[0], token[1]);
+		if (strcmp(token[0], "endmode") == 0) {
+//bb_info_msg("OK[%s]", mode);
+			return 1;
+		}
+		p = token[1];
+		switch ((i=index_in_strings(
+			"geometry\0timings\0interlaced\0double\0vsync\0hsync\0csync\0extsync\0",
+			token[0]))) {
+		case 0:
+			/* FIXME: catastrophic on arches with 64bit ints */
+			sscanf(p, "%d %d %d %d %d",
+				&(base->xres), &(base->yres),
+				&(base->xres_virtual), &(base->yres_virtual),
+				&(base->bits_per_pixel));
+//bb_info_msg("GEO[%s]", p);
+			break;
+		case 1:
+			sscanf(p, "%d %d %d %d %d %d %d",
+				&(base->pixclock),
+				&(base->left_margin), &(base->right_margin),
+				&(base->upper_margin), &(base->lower_margin),
+				&(base->hsync_len), &(base->vsync_len));
+//bb_info_msg("TIM[%s]", p);
+			break;
+		case 2:
+		case 3: {
+			static const uint32_t syncs[] = {FB_VMODE_INTERLACED, FB_VMODE_DOUBLE};
+			ss(&base->vmode, syncs[i-2], p, "false");
+//bb_info_msg("VMODE[%s]", p);
+			break;
+		}
+		case 4:
+		case 5:
+		case 6:	{
+			static const uint32_t syncs[] = {FB_SYNC_VERT_HIGH_ACT, FB_SYNC_HOR_HIGH_ACT, FB_SYNC_COMP_HIGH_ACT};
+			ss(&base->sync, syncs[i-4], p, "low");
+//bb_info_msg("SYNC[%s]", p);
+			break;
+		}
+		case 7:
+			ss(&base->sync, FB_SYNC_EXT, p, "false");
+//bb_info_msg("EXTSYNC[%s]", p);
+			break;
 		}
 	}
 	return 0;
 }
 #endif
 
-static void setmode(struct fb_var_screeninfo *base,
+static FAST_FUNC void setmode(struct fb_var_screeninfo *base,
 					struct fb_var_screeninfo *set)
 {
 	if ((int32_t) set->xres > 0)
@@ -259,7 +271,7 @@
 		base->bits_per_pixel = set->bits_per_pixel;
 }
 
-static void showmode(struct fb_var_screeninfo *v)
+static FAST_FUNC void showmode(struct fb_var_screeninfo *v)
 {
 	double drate = 0, hrate = 0, vrate = 0;
 
