Date:2012-01-12 19:40:24 (12 years 2 months ago)
Author:Paul Cercueil
Commit:b4105ec8d213ed09405ae4dff128d7cd9dfa7d53
Message:fbcon: optimize parameters parsing loop.

Files: drivers/video/console/fbcon.c (5 diffs)

Change Details

drivers/video/console/fbcon.c
442442        return 1;
443443
444444    while ((options = strsep(&this_opt, ",")) != NULL) {
445        if (!strncmp(options, "font:", 5))
445        if (!strncmp(options, "font:", 5)) {
446446            strlcpy(fontname, options + 5, sizeof(fontname));
447            continue;
448        }
447449
448450        if (!strncmp(options, "scrollback:", 11)) {
449451            char *k;
...... 
469471            /* (k && *k): Check for garbage after the suffix */
470472            if (ret || (k && *k))
471473                printk(KERN_WARNING "fbcon: scrollback: incorrect value.\n");
474            continue;
472475        }
473476
474477        if (!strncmp(options, "map:", 4)) {
...... 
485488            } else {
486489                printk(KERN_WARNING "fbcon: map: incorrect value.\n");
487490            }
491            continue;
488492        }
489493
490494        if (!strncmp(options, "vc:", 3)) {
...... 
514518                fbcon_is_default = 0;
515519            else
516520                printk(KERN_WARNING "fbcon: vc: incorrect value.\n");
521            continue;
517522        }
518523
519524        if (!strncmp(options, "rotate:", 7)) {
...... 
526531            } else {
527532                printk(KERN_WARNING "fbcon: rotate: incorrect value.\n");
528533            }
534            continue;
529535        }
530536    }
531537    return 1;

Archive Download the corresponding diff file



interactive