asprintf and snprintf support

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2009-12-29 10:04:06 +01:00
parent c181849b95
commit 8b442f3f4c
60 changed files with 396 additions and 345 deletions

View file

@ -63,11 +63,10 @@ grub_efi_set_prefix (void)
if (p)
*p = '\0';
prefix = grub_malloc (1 + grub_strlen (device) + 1
+ grub_strlen (file) + 1);
prefix = grub_asprintf ("(%s)%s", device, file);
if (prefix)
{
grub_sprintf (prefix, "(%s)%s", device, file);
grub_env_set ("prefix", prefix);
grub_free (prefix);
}