path: root/common/partitions.c
diff options
authorSascha Hauer <>2016-04-11 16:52:10 +0200
committerSascha Hauer <>2016-04-15 12:21:45 +0200
commit947fb5adf8af450507c978abf1c7ec9f051e5842 (patch)
treeaf790669292308b56baf188611ac430012037cba /common/partitions.c
parent48b205e32342fc8a2648b2bd3f1f6d9a7d74e6cb (diff)
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 <>
Diffstat (limited to 'common/partitions.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/common/partitions.c b/common/partitions.c
index 82ec508..69a2b1fe 100644
--- a/common/partitions.c
+++ b/common/partitions.c
@@ -51,7 +51,7 @@ static int register_one_partition(struct block_device *blk,
uint64_t size = part->size * SECTOR_SIZE;
struct cdev *cdev;
- partition_name = asprintf("%s.%d", blk->, no);
+ partition_name = basprintf("%s.%d", blk->, no);
if (!partition_name)
return -ENOMEM;
dev_dbg(blk->dev, "Registering partition %s on drive %s\n",