aboutsummaryrefslogtreecommitdiffhomepage
path: root/container/mount.go
diff options
context:
space:
mode:
Diffstat (limited to 'container/mount.go')
-rw-r--r--container/mount.go25
1 files changed, 0 insertions, 25 deletions
diff --git a/container/mount.go b/container/mount.go
index 2749d0ec..0c459c9c 100644
--- a/container/mount.go
+++ b/container/mount.go
@@ -4,7 +4,6 @@ import (
"errors"
"fmt"
"os"
- "strings"
. "syscall"
"hakurei.app/container/vfs"
@@ -85,13 +84,6 @@ const (
// OptionOverlayUserxattr represents the userxattr option of the overlay pseudo-filesystem.
// Use the "user.overlay." xattr namespace instead of "trusted.overlay.".
OptionOverlayUserxattr = "userxattr"
-
- // SpecialOverlayEscape is the escape string for overlay mount options.
- SpecialOverlayEscape = `\`
- // SpecialOverlayOption is the separator string between overlay mount options.
- SpecialOverlayOption = ","
- // SpecialOverlayPath is the separator string between overlay paths.
- SpecialOverlayPath = ":"
)
// bindMount mounts source on target and recursively applies flags if MS_REC is set.
@@ -206,20 +198,3 @@ func parentPerm(perm os.FileMode) os.FileMode {
}
return os.FileMode(pperm)
}
-
-// EscapeOverlayDataSegment escapes a string for formatting into the data argument of an overlay mount call.
-func EscapeOverlayDataSegment(s string) string {
- if s == zeroString {
- return zeroString
- }
-
- if f := strings.SplitN(s, "\x00", 2); len(f) > 0 {
- s = f[0]
- }
-
- return strings.NewReplacer(
- SpecialOverlayEscape, SpecialOverlayEscape+SpecialOverlayEscape,
- SpecialOverlayOption, SpecialOverlayEscape+SpecialOverlayOption,
- SpecialOverlayPath, SpecialOverlayEscape+SpecialOverlayPath,
- ).Replace(s)
-}