Index: video/i386/pc/vbe.c =================================================================== --- video/i386/pc/vbe.c (revision 2496) +++ video/i386/pc/vbe.c (working copy) @@ -382,7 +382,7 @@ unsigned int mode_type) { grub_uint16_t *p; - struct grub_vbe_mode_info_block mode_info; + struct grub_vbe_mode_info_block vbe_mode_info; struct grub_vbe_mode_info_block best_mode_info; grub_uint32_t best_mode = 0; int depth; @@ -396,7 +396,7 @@ { grub_uint32_t mode = *p; - grub_vbe_get_video_mode_info (mode, &mode_info); + grub_vbe_get_video_mode_info (mode, &vbe_mode_info); if (grub_errno != GRUB_ERR_NONE) { /* Could not retrieve mode info, retreat. */ @@ -404,33 +404,33 @@ break; } - if ((mode_info.mode_attributes & 0x001) == 0) + if ((vbe_mode_info.mode_attributes & 0x001) == 0) /* If not available, skip it. */ continue; - if ((mode_info.mode_attributes & 0x002) == 0) + if ((vbe_mode_info.mode_attributes & 0x002) == 0) /* Not enough information. */ continue; - if ((mode_info.mode_attributes & 0x008) == 0) + if ((vbe_mode_info.mode_attributes & 0x008) == 0) /* Monochrome is unusable. */ continue; - if ((mode_info.mode_attributes & 0x080) == 0) + if ((vbe_mode_info.mode_attributes & 0x080) == 0) /* We support only linear frame buffer modes. */ continue; - if ((mode_info.mode_attributes & 0x010) == 0) + if ((vbe_mode_info.mode_attributes & 0x010) == 0) /* We allow only graphical modes. */ continue; - if ((mode_info.memory_model != GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL) - && (mode_info.memory_model != GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR)) + if ((vbe_mode_info.memory_model != GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL) + && (vbe_mode_info.memory_model != GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR)) /* Not compatible memory model. */ continue; - if ((mode_info.x_resolution != width) - || (mode_info.y_resolution != height)) + if ((vbe_mode_info.x_resolution != width) + || (vbe_mode_info.y_resolution != height)) /* Non matching resolution. */ continue; @@ -438,28 +438,28 @@ if ((mode_type & GRUB_VIDEO_MODE_TYPE_COLOR_MASK) != 0) { if (((mode_type & GRUB_VIDEO_MODE_TYPE_INDEX_COLOR) != 0) - && (mode_info.memory_model != GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL)) + && (vbe_mode_info.memory_model != GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL)) /* Requested only index color modes. */ continue; if (((mode_type & GRUB_VIDEO_MODE_TYPE_RGB) != 0) - && (mode_info.memory_model != GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR)) + && (vbe_mode_info.memory_model != GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR)) /* Requested only RGB modes. */ continue; } /* If there is a request for specific depth, ignore others. */ - if ((depth != 0) && (mode_info.bits_per_pixel != depth)) + if ((depth != 0) && (vbe_mode_info.bits_per_pixel != depth)) continue; /* Select mode with most number of bits per pixel. */ if (best_mode != 0) - if (mode_info.bits_per_pixel < best_mode_info.bits_per_pixel) + if (vbe_mode_info.bits_per_pixel < best_mode_info.bits_per_pixel) continue; /* Save so far best mode information for later use. */ best_mode = mode; - grub_memcpy (&best_mode_info, &mode_info, sizeof (mode_info)); + grub_memcpy (&best_mode_info, &vbe_mode_info, sizeof (vbe_mode_info)); } /* Try to initialize best mode found. */