Since every API builds its patch via build_path, updating that
function should be enough.
Changes from v1:
1. Append the namespace only if it is defined. This will remove an
additional "/" which would be introduced otherwise.
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
* XX: Change to snprintf once you figure what n should be
*/
if (strcmp(cg_mount_table[i].name, type) == 0) {
- sprintf(path, "%s/", cg_mount_table[i].path);
+ if (cg_namespace_table[i]) {
+ sprintf(path, "%s/%s/", cg_mount_table[i].path,
+ cg_namespace_table[i]);
+ } else {
+ sprintf(path, "%s/", cg_mount_table[i].path);
+ }
+
if (name) {
char *tmp;
tmp = strdup(path);