* grub-core/fs/jfs.c (grub_jfs_label): Use first label if second one
starts with control character.
This commit is contained in:
parent
0382d9bb22
commit
d2d58d0ab4
2 changed files with 15 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2012-03-19 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/fs/jfs.c (grub_jfs_label): Use first label if second one
|
||||||
|
starts with control character.
|
||||||
|
|
||||||
2012-03-19 Vladimir Serbinenko <phcoder@gmail.com>
|
2012-03-19 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* grub-core/gdb/cstub.c (grub_gdb_inbuf): Increase the size to avoid
|
* grub-core/gdb/cstub.c (grub_gdb_inbuf): Increase the size to avoid
|
||||||
|
|
|
@ -888,12 +888,18 @@ grub_jfs_label (grub_device_t device, char **label)
|
||||||
|
|
||||||
if (data)
|
if (data)
|
||||||
{
|
{
|
||||||
if (data->sblock.volname2[0])
|
if (data->sblock.volname2[0] < ' ')
|
||||||
|
{
|
||||||
|
char *ptr;
|
||||||
|
ptr = data->sblock.volname + sizeof (data->sblock.volname) - 1;
|
||||||
|
while (ptr >= data->sblock.volname && *ptr == ' ')
|
||||||
|
ptr--;
|
||||||
|
*label = grub_strndup (data->sblock.volname,
|
||||||
|
ptr - data->sblock.volname + 1);
|
||||||
|
}
|
||||||
|
else
|
||||||
*label = grub_strndup (data->sblock.volname2,
|
*label = grub_strndup (data->sblock.volname2,
|
||||||
sizeof (data->sblock.volname2));
|
sizeof (data->sblock.volname2));
|
||||||
else
|
|
||||||
*label = grub_strndup (data->sblock.volname,
|
|
||||||
sizeof (data->sblock.volname));
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
*label = 0;
|
*label = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue