+2013-11-12 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * grub-core/fs/proc.c: Allow \0 in proc files.
+
2013-11-12 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/tests/xnu_uuid_test.c: Fix assert message.
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;
}
;
static char *
-get_test_txt (void)
+get_test_txt (grub_size_t *sz)
{
+ *sz = grub_strlen (testfile);
return grub_strdup (testfile);
}
"timeout=3\n";
static char *
-get_test_cfg (void)
+get_test_cfg (grub_size_t *sz)
{
+ *sz = grub_strlen (testfile);
return grub_strdup (testfile);
}
struct grub_procfs_entry **prev;
const char *name;
- char * (*get_contents) (void);
+ char * (*get_contents) (grub_size_t *sz);
};
extern struct grub_procfs_entry *grub_procfs_entries;