Fix handling of install lists.
This commit is contained in:
parent
2df8f43d3e
commit
a284320e1e
2 changed files with 15 additions and 4 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2013-11-18 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
Fix handling of install lists.
|
||||||
|
|
||||||
2013-11-18 Vladimir Serbinenko <phcoder@gmail.com>
|
2013-11-18 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* grub-core/lib/sparc64/setjmp.S: Force spilling of current window.
|
* grub-core/lib/sparc64/setjmp.S: Force spilling of current window.
|
||||||
|
|
|
@ -271,6 +271,7 @@ handle_install_list (struct install_list *il, const char *val,
|
||||||
}
|
}
|
||||||
il->n_alloc = il->n_entries + 1;
|
il->n_alloc = il->n_entries + 1;
|
||||||
il->entries = xmalloc (il->n_alloc * sizeof (il->entries[0]));
|
il->entries = xmalloc (il->n_alloc * sizeof (il->entries[0]));
|
||||||
|
ptr = val;
|
||||||
for (ce = il->entries; ; ce++)
|
for (ce = il->entries; ; ce++)
|
||||||
{
|
{
|
||||||
const char *bptr;
|
const char *bptr;
|
||||||
|
@ -284,7 +285,6 @@ handle_install_list (struct install_list *il, const char *val,
|
||||||
*ce = xmalloc (ptr - bptr + 1);
|
*ce = xmalloc (ptr - bptr + 1);
|
||||||
memcpy (*ce, bptr, ptr - bptr);
|
memcpy (*ce, bptr, ptr - bptr);
|
||||||
(*ce)[ptr - bptr] = '\0';
|
(*ce)[ptr - bptr] = '\0';
|
||||||
ce++;
|
|
||||||
}
|
}
|
||||||
*ce = NULL;
|
*ce = NULL;
|
||||||
}
|
}
|
||||||
|
@ -662,10 +662,17 @@ grub_install_copy_files (const char *src,
|
||||||
install_modules.entries);
|
install_modules.entries);
|
||||||
for (p = path_list; p; p = p->next)
|
for (p = path_list; p; p = p->next)
|
||||||
{
|
{
|
||||||
char *srcf = grub_util_path_concat_ext (2, src, p->name, ".mo");
|
const char *srcf = p->name;
|
||||||
char *dstf = grub_util_path_concat_ext (2, dst, p->name, ".mo");
|
const char *dir;
|
||||||
|
char *dstf;
|
||||||
|
|
||||||
|
dir = grub_strrchr (srcf, '/');
|
||||||
|
if (dir)
|
||||||
|
dir++;
|
||||||
|
else
|
||||||
|
dir = srcf;
|
||||||
|
dstf = grub_util_path_concat (2, dst, dir);
|
||||||
grub_install_compress_file (srcf, dstf, 1);
|
grub_install_compress_file (srcf, dstf, 1);
|
||||||
free (srcf);
|
|
||||||
free (dstf);
|
free (dstf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue