Skip to content

Commit a6906d5

Browse files
authored
Merge pull request opencontainers#1467 from tklauser/readme-syscall-to-unix
Switch examples in README.md from syscall to x/sys/unix
2 parents cf630c6 + b576838 commit a6906d5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

libcontainer/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Once you have an instance of the factory created we can create a configuration
5656
struct describing how the container is to be created. A sample would look similar to this:
5757

5858
```go
59-
defaultMountFlags := syscall.MS_NOEXEC | syscall.MS_NOSUID | syscall.MS_NODEV
59+
defaultMountFlags := unix.MS_NOEXEC | unix.MS_NOSUID | unix.MS_NODEV
6060
config := &configs.Config{
6161
Rootfs: "/your/path/to/rootfs",
6262
Capabilities: []string{
@@ -112,14 +112,14 @@ config := &configs.Config{
112112
Source: "tmpfs",
113113
Destination: "/dev",
114114
Device: "tmpfs",
115-
Flags: syscall.MS_NOSUID | syscall.MS_STRICTATIME,
115+
Flags: unix.MS_NOSUID | unix.MS_STRICTATIME,
116116
Data: "mode=755",
117117
},
118118
{
119119
Source: "devpts",
120120
Destination: "/dev/pts",
121121
Device: "devpts",
122-
Flags: syscall.MS_NOSUID | syscall.MS_NOEXEC,
122+
Flags: unix.MS_NOSUID | unix.MS_NOEXEC,
123123
Data: "newinstance,ptmxmode=0666,mode=0620,gid=5",
124124
},
125125
{
@@ -139,7 +139,7 @@ config := &configs.Config{
139139
Source: "sysfs",
140140
Destination: "/sys",
141141
Device: "sysfs",
142-
Flags: defaultMountFlags | syscall.MS_RDONLY,
142+
Flags: defaultMountFlags | unix.MS_RDONLY,
143143
},
144144
},
145145
UidMappings: []configs.IDMap{
@@ -165,7 +165,7 @@ config := &configs.Config{
165165
},
166166
Rlimits: []configs.Rlimit{
167167
{
168-
Type: syscall.RLIMIT_NOFILE,
168+
Type: unix.RLIMIT_NOFILE,
169169
Hard: uint64(1025),
170170
Soft: uint64(1025),
171171
},

0 commit comments

Comments
 (0)