~ubuntu-branches/debian/stretch/grub2/stretch

« back to all changes in this revision

Viewing changes to util/i386/pc/grub-setup.c

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2010-06-15 12:45:35 UTC
  • mto: (1.14.1 upstream) (17.3.18 experimental)
  • mto: This revision was merged to the branch mainline in revision 36.
  • Revision ID: james.westby@ubuntu.com-20100615124535-9vfbis4kzv0h5bgy
Tags: upstream-1.98+20100614
ImportĀ upstreamĀ versionĀ 1.98+20100614

Show diffs side-by-side

added added

removed removed

Lines of Context:
76
76
  return -1;
77
77
}
78
78
 
79
 
struct grub_handler_class grub_term_input_class;
80
 
struct grub_handler_class grub_term_output_class;
81
 
 
82
79
void
83
80
grub_refresh (void)
84
81
{
126
123
      /* There's always an embed region, and it starts right after the MBR.  */
127
124
      embed_region.start = 1;
128
125
 
129
 
      if (embed_region.end > p->start)
130
 
        embed_region.end = p->start;
 
126
      if (embed_region.end > grub_partition_get_start (p))
 
127
        embed_region.end = grub_partition_get_start (p);
131
128
 
132
129
      return 0;
133
130
    }
147
144
      /* If there's an embed region, it is in a dedicated partition.  */
148
145
      if (! memcmp (&gptdata.type, &grub_gpt_partition_type_bios_boot, 16))
149
146
        {
150
 
          embed_region.start = p->start;
151
 
          embed_region.end = p->start + p->len;
 
147
          embed_region.start = grub_partition_get_start (p);
 
148
          embed_region.end = grub_partition_get_start (p) + grub_partition_get_len (p);
152
149
 
153
150
          return 1;
154
151
        }
361
358
  else
362
359
    grub_util_error (_("No DOS-style partitions found"));
363
360
 
364
 
  if (embed_region.end == embed_region.start)
 
361
  if (embed_region.end <= embed_region.start)
365
362
    {
366
363
      if (! strcmp (dest_partmap, "msdos"))
367
364
        grub_util_warn (_("This msdos-style partition label has no post-MBR gap; embedding won't be possible!"));
702
699
            break;
703
700
 
704
701
          case 'V':
705
 
            printf ("grub-setup (%s) %s\n", PACKAGE_NAME, PACKAGE_VERSION);
 
702
            printf ("%s (%s) %s\n", program_name, PACKAGE_NAME, PACKAGE_VERSION);
706
703
            return 0;
707
704
 
708
705
          case 'v':