* grub-core/fs/proc.c: Allow \0 in proc files.

This commit is contained in:
Vladimir Serbinenko 2013-11-12 15:57:09 +01:00
parent ba82db7a0d
commit 3bbeade41d
5 changed files with 12 additions and 5 deletions

View file

@ -128,10 +128,11 @@ grub_procfs_open (struct grub_file *file, const char *path)
FOR_LIST_ELEMENTS((entry), (grub_procfs_entries))
if (grub_strcmp (pathptr, entry->name) == 0)
{
file->data = entry->get_contents ();
grub_size_t sz;
file->data = entry->get_contents (&sz);
if (!file->data)
return grub_errno;
file->size = grub_strlen (file->data);
file->size = sz;
return GRUB_ERR_NONE;
}