summaryrefslogtreecommitdiffstats
path: root/fs/nfs.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-04-11 16:52:10 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2016-04-15 12:21:45 +0200
commit947fb5adf8af450507c978abf1c7ec9f051e5842 (patch)
treeaf790669292308b56baf188611ac430012037cba /fs/nfs.c
parent48b205e32342fc8a2648b2bd3f1f6d9a7d74e6cb (diff)
downloadbarebox-947fb5adf8af450507c978abf1c7ec9f051e5842.tar.gz
barebox-947fb5adf8af450507c978abf1c7ec9f051e5842.tar.xz
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 <s.hauer@pengutronix.de>
Diffstat (limited to 'fs/nfs.c')
-rw-r--r--fs/nfs.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/nfs.c b/fs/nfs.c
index 87828fce13..1e874d541e 100644
--- a/fs/nfs.c
+++ b/fs/nfs.c
@@ -1317,19 +1317,18 @@ static void nfs_set_rootarg(struct nfs_priv *npriv, struct fs_device_d *fsdev)
const char *ip;
ip = ip_to_string(npriv->server);
- str = asprintf("root=/dev/nfs nfsroot=%s:%s%s%s",
- ip, npriv->path, rootnfsopts[0] ? "," : "",
- rootnfsopts);
+ str = basprintf("root=/dev/nfs nfsroot=%s:%s%s%s", ip, npriv->path,
+ rootnfsopts[0] ? "," : "", rootnfsopts);
/* forward specific mount options on demand */
if (npriv->manual_nfs_port == 1) {
- tmp = asprintf("%s,port=%hu", str, npriv->nfs_port);
+ tmp = basprintf("%s,port=%hu", str, npriv->nfs_port);
free(str);
str = tmp;
}
if (npriv->manual_mount_port == 1) {
- tmp = asprintf("%s,mountport=%hu", str, npriv->mount_port);
+ tmp = basprintf("%s,mountport=%hu", str, npriv->mount_port);
free(str);
str = tmp;
}