From 947fb5adf8af450507c978abf1c7ec9f051e5842 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Mon, 11 Apr 2016 16:52:10 +0200 Subject: string: Fix (v)asprintf prototypes Our asprintf and vasprintf have different prototypes than the glibc functions. This causes trouble when we want to share barebox code with userspace code. Change the prototypes for (v)asprintf to match the glibc prototypes. Since the current (v)asprintf are convenient to use change the existing functions to b(v)asprintf. Signed-off-by: Sascha Hauer --- fs/efivarfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fs/efivarfs.c') diff --git a/fs/efivarfs.c b/fs/efivarfs.c index c7a282b05c..86cdcf0b59 100644 --- a/fs/efivarfs.c +++ b/fs/efivarfs.c @@ -154,7 +154,7 @@ static int efivars_create(struct device_d *dev, const char *pathname, mode_t mod name8 = xstrdup_wchar_to_char(inode->name); - inode->full_name = asprintf("%s-%pUl", name8, &inode->vendor); + inode->full_name = basprintf("%s-%pUl", name8, &inode->vendor); free(name8); efiret = RT->set_variable(inode->name, &inode->vendor, @@ -405,7 +405,7 @@ static int efivarfs_probe(struct device_d *dev) inode->vendor = vendor; name8 = xstrdup_wchar_to_char(inode->name); - inode->full_name = asprintf("%s-%pUl", name8, &vendor); + inode->full_name = basprintf("%s-%pUl", name8, &vendor); free(name8); list_add_tail(&inode->node, &priv->inodes); -- cgit v1.2.3