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

« back to all changes in this revision

Viewing changes to partmap/msdos.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:
300
300
static char *
301
301
pc_partition_map_get_name (const grub_partition_t p)
302
302
{
303
 
  char *name;
304
303
  struct grub_msdos_partition *pcdata = p->data;
305
304
 
306
 
  name = grub_malloc (13);
307
 
  if (! name)
308
 
    return 0;
309
 
 
310
305
  if (pcdata->bsd_part < 0)
311
 
    grub_sprintf (name, "%d", pcdata->dos_part + 1);
 
306
    return grub_xasprintf ("%d", pcdata->dos_part + 1);
312
307
  else if (pcdata->dos_part < 0)
313
 
    grub_sprintf (name, "%c", pcdata->bsd_part + 'a');
 
308
    return grub_xasprintf ("%c", pcdata->bsd_part + 'a');
314
309
  else
315
 
    grub_sprintf (name, "%d,%c", pcdata->dos_part + 1, pcdata->bsd_part + 'a');
316
 
 
317
 
  return name;
 
310
    return grub_xasprintf ("%d,%c", pcdata->dos_part + 1,
 
311
                          pcdata->bsd_part + 'a');
318
312
}
319
313
 
320
314