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

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

Change Details

drivers/video/console/fbcon.c
441441        return 1;
442442
443443    while ((options = strsep(&this_opt, ",")) != NULL) {
444        if (!strncmp(options, "font:", 5))
444        if (!strncmp(options, "font:", 5)) {
445445            strlcpy(fontname, options + 5, sizeof(fontname));
446            continue;
447        }
446448
447449        if (!strncmp(options, "scrollback:", 11)) {
448450            char *k;
...... 
468470            /* (k && *k): Check for garbage after the suffix */
469471            if (ret || (k && *k))
470472                printk(KERN_WARNING "fbcon: scrollback: incorrect value.\n");
473            continue;
471474        }
472475
473476        if (!strncmp(options, "map:", 4)) {
...... 
484487            } else {
485488                printk(KERN_WARNING "fbcon: map: incorrect value.\n");
486489            }
490            continue;
487491        }
488492
489493        if (!strncmp(options, "vc:", 3)) {
...... 
513517                fbcon_is_default = 0;
514518            else
515519                printk(KERN_WARNING "fbcon: vc: incorrect value.\n");
520            continue;
516521        }
517522
518523        if (!strncmp(options, "rotate:", 7)) {
...... 
525530            } else {
526531                printk(KERN_WARNING "fbcon: rotate: incorrect value.\n");
527532            }
533            continue;
528534        }
529535    }
530536    return 1;

Archive Download the corresponding diff file



interactive