Skip to content
Snippets Groups Projects
Commit 57b1e224 authored by Ronny Nilsson's avatar Ronny Nilsson
Browse files

There is a premade constant already for use when naming volumes.

parent 611c7044
Branches
No related tags found
No related merge requests found
...@@ -242,8 +242,8 @@ int ubi_create_volume(int volId, long long size) ...@@ -242,8 +242,8 @@ int ubi_create_volume(int volId, long long size)
if(size <= 0ll) return -1; if(size <= 0ll) return -1;
// Generate a system unique name for the volume. // Generate a system unique name for the volume.
name = calloc(1, strlen(ubiStr3) + 8); name = calloc(1, UBI_MAX_VOLUME_NAME + 1);
snprintf(name, strlen(ubiStr3) + 8, "%s_%d", ubiStr3, volId); snprintf(name, UBI_MAX_VOLUME_NAME + 1, "%s_%d", ubiStr3, volId);
memset(&mkReq, 0, sizeof(mkReq)); memset(&mkReq, 0, sizeof(mkReq));
mkReq.vol_id = volId; mkReq.vol_id = volId;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment