~ubuntu-branches/ubuntu/wily/grub2/wily-proposed

« back to all changes in this revision

Viewing changes to loader/i386/linux.c

  • Committer: Bazaar Package Importer
  • Author(s): Felix Zielcke, Robert Millan, Felix Zielcke
  • Date: 2010-01-26 19:26:25 UTC
  • mfrom: (1.13.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20100126192625-coq6czap2ofjollf
Tags: 1.98~20100126-1
* New Bazaar snapshot.
  - Includes mipsel-yeeloong port.

[ Robert Millan ]
* config.in: Lower priority of grub2/linux_cmdline_default.

[ Felix Zielcke ]
* Drop `CFLAGS=-O0' workaround on powerpc. Should be fixed correctly now.
* Ship grub-bin2h and grub-script-check in grub-common.
* Terminate NEWS.Debian with a blank line like lintian would suggest
  if that check would be working correctly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
519
519
     May change in future if we have modes without framebuffer.  */
520
520
  if (modevar && *modevar != 0)
521
521
    {
522
 
      tmp = grub_malloc (grub_strlen (modevar)
523
 
                         + sizeof (";text"));
 
522
      tmp = grub_xasprintf ("%s;text", modevar);
524
523
      if (! tmp)
525
524
        return grub_errno;
526
 
      grub_sprintf (tmp, "%s;text", modevar);
527
 
      err = grub_video_set_mode (tmp, 0);
 
525
      err = grub_video_set_mode (tmp, 0, 0);
528
526
      grub_free (tmp);
529
527
    }
530
528
  else
531
 
    err = grub_video_set_mode ("text", 0);
 
529
    err = grub_video_set_mode ("text", 0, 0);
532
530
 
533
531
  if (err)
534
532
    {
538
536
    }
539
537
 
540
538
  if (! grub_linux_setup_video (params))
541
 
    params->have_vga = GRUB_VIDEO_TYPE_VLFB;
 
539
    {
 
540
      /* Use generic framebuffer unless VESA is known to be supported.  */
 
541
      if (params->have_vga != GRUB_VIDEO_LINUX_TYPE_VESA)
 
542
        params->have_vga = GRUB_VIDEO_LINUX_TYPE_SIMPLE;
 
543
    }
542
544
  else
543
545
    {
544
 
      params->have_vga = GRUB_VIDEO_TYPE_TEXT;
 
546
      params->have_vga = GRUB_VIDEO_LINUX_TYPE_TEXT;
545
547
      params->video_width = 80;
546
548
      params->video_height = 25;
547
549
    }
548
550
 
549
551
  /* Initialize these last, because terminal position could be affected by printfs above.  */
550
 
  if (params->have_vga == GRUB_VIDEO_TYPE_TEXT)
 
552
  if (params->have_vga == GRUB_VIDEO_LINUX_TYPE_TEXT)
551
553
    {
552
554
      grub_term_output_t term;
553
555
      int found = 0;
796
798
                break;
797
799
              }
798
800
 
799
 
            buf = grub_malloc (sizeof ("WWWWxHHHHxDD;WWWWxHHHH"));
800
 
            if (! buf)
801
 
              goto fail;
 
801
            /* We can't detect VESA, but user is implicitly telling us that it
 
802
               is built-in because `vga=' parameter was used.  */
 
803
            params->have_vga = GRUB_VIDEO_LINUX_TYPE_VESA;
802
804
 
803
805
            linux_mode
804
806
              = &linux_vesafb_modes[vid_mode - GRUB_LINUX_VID_MODE_VESA_START];
805
807
 
806
 
            grub_sprintf (buf, "%ux%ux%u,%ux%u",
807
 
                          linux_vesafb_res[linux_mode->res_index].width,
808
 
                          linux_vesafb_res[linux_mode->res_index].height,
809
 
                          linux_mode->depth,
810
 
                          linux_vesafb_res[linux_mode->res_index].width,
811
 
                          linux_vesafb_res[linux_mode->res_index].height);
 
808
            buf = grub_xasprintf ("%ux%ux%u,%ux%u",
 
809
                                 linux_vesafb_res[linux_mode->res_index].width,
 
810
                                 linux_vesafb_res[linux_mode->res_index].height,
 
811
                                 linux_mode->depth,
 
812
                                 linux_vesafb_res[linux_mode->res_index].width,
 
813
                                 linux_vesafb_res[linux_mode->res_index].height);
 
814
            if (! buf)
 
815
              goto fail;
 
816
 
812
817
            grub_printf ("%s is deprecated. "
813
818
                         "Use set gfxpayload=%s before "
814
819
                         "linux command instead.\n",