[2/5] mount: remove leading double slash

Submitted by Pavel Tikhomirov on Sept. 11, 2018, 8:09 a.m.

Details

Message ID 20180911080906.4555-3-ptikhomirov@virtuozzo.com
State Accepted
Series "minor fixes related to paths and logs"
Headers show

Commit Message

Pavel Tikhomirov Sept. 11, 2018, 8:09 a.m.
As mnt_roots always has a slash at the beginning we don't need another:

(00.156035)      1: mnt: Move the root to //tmp/.criu.mntns.ZKVJHl/15-0000000000

Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
---
 criu/mount.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/criu/mount.c b/criu/mount.c
index d95e60334..549039978 100644
--- a/criu/mount.c
+++ b/criu/mount.c
@@ -3354,8 +3354,7 @@  int prepare_mnt_ns(void)
 		}
 
 		/* Set its root */
-		path[0] = '/';
-		print_ns_root(nsid, 0, path + 1, sizeof(path) - 1);
+		print_ns_root(nsid, 0, path, sizeof(path) - 1);
 		if (cr_pivot_root(path))
 			goto err;