Commit 1a206eed authored by Andrew Vagin's avatar Andrew Vagin Committed by Pavel Emelyanov

mount: return a relative path from cut_root_for_bind()

static char *cut_root_for_bind(char *target_root, char *source_root)

Currently it returns a relative path if source_root is '/' and
an absolute path for other cases.
Signed-off-by: 's avatarAndrew Vagin <avagin@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 24f63b5f
......@@ -806,6 +806,8 @@ static char *cut_root_for_bind(char *target_root, char *source_root)
break;
BUG_ON(target_root[tok] == '\0');
}
if (target_root[tok] == '/')
tok++;
return target_root + tok;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment