summaryrefslogtreecommitdiffstats
path: root/fs/fs.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-05-09 08:49:42 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2016-05-09 08:49:42 +0200
commit55aca0a48c5cb68eeddf723a5bc69fc052071e61 (patch)
tree00961bee994725f5d3ee678c5630b53ecc5a02fe /fs/fs.c
parent216f412ede9cb78ccdfd00df89246ab1ffc9e300 (diff)
parent18f0d2221a4c781dad2a224f8ac17e7c95fd1d9c (diff)
downloadbarebox-55aca0a48c5cb68eeddf723a5bc69fc052071e61.tar.gz
barebox-55aca0a48c5cb68eeddf723a5bc69fc052071e61.tar.xz
Merge branch 'for-next/include-cleanup'
Diffstat (limited to 'fs/fs.c')
-rw-r--r--fs/fs.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/fs.c b/fs/fs.c
index 966abe9408..f63a2dde51 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -18,6 +18,7 @@
*/
#include <common.h>
+#include <command.h>
#include <fs.h>
#include <driver.h>
#include <errno.h>
@@ -33,6 +34,7 @@
#include <environment.h>
#include <libgen.h>
#include <block.h>
+#include <libfile.h>
char *mkmodestr(unsigned long mode, char *str)
{
@@ -1299,7 +1301,8 @@ int mount(const char *device, const char *fsname, const char *_path,
}
if (!fsdev->linux_rootarg && fsdev->cdev && fsdev->cdev->partuuid[0] != 0) {
- char *str = asprintf("root=PARTUUID=%s", fsdev->cdev->partuuid);
+ char *str = basprintf("root=PARTUUID=%s",
+ fsdev->cdev->partuuid);
fsdev_set_linux_rootarg(fsdev, str);
}
@@ -1718,10 +1721,10 @@ const char *cdev_mount_default(struct cdev *cdev, const char *fsoptions)
if (path)
return path;
- newpath = asprintf("/mnt/%s", cdev->name);
+ newpath = basprintf("/mnt/%s", cdev->name);
make_directory(newpath);
- devpath = asprintf("/dev/%s", cdev->name);
+ devpath = basprintf("/dev/%s", cdev->name);
ret = mount(devpath, NULL, newpath, fsoptions);