Browse code

fix aufs mount option length calculation

We add ",dirperm1" but only increase length by len("dirperm1").

Signed-off-by: Peng Tao <bergwolf@gmail.com>

Peng Tao authored on 2017/06/08 20:21:52
Showing 1 changed files
... ...
@@ -573,7 +573,7 @@ func (a *Driver) aufsMount(ro []string, rw, target, mountLabel string) (err erro
573 573
 
574 574
 	offset := 54
575 575
 	if useDirperm() {
576
-		offset += len("dirperm1")
576
+		offset += len(",dirperm1")
577 577
 	}
578 578
 	b := make([]byte, syscall.Getpagesize()-len(mountLabel)-offset) // room for xino & mountLabel
579 579
 	bp := copy(b, fmt.Sprintf("br:%s=rw", rw))