We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent af213d6 commit f0d2a53Copy full SHA for f0d2a53
init/init.go init/main.goinit/init.go renamed to init/main.go
@@ -66,8 +66,6 @@ func relocateRootFS() error {
66
}
67
68
func main() {
69
- const ramfsMagic int64 = 0x858458f6
70
- const tmpfsMagic int64 = 0x01021994
71
var sfs unix.Statfs_t
72
73
if err := unix.Statfs("/", &sfs); err != nil {
@@ -76,7 +74,7 @@ func main() {
76
74
77
75
// Some programs (e.g. runc) refuse to work if the rootfs is a tmpfs or ramfs.
78
// So, we need to copy all the files into a new tmpfs and make it the new rootfs.
79
- if sfs.Type == ramfsMagic || sfs.Type == tmpfsMagic {
+ if sfs.Type == unix.RAMFS_MAGIC || sfs.Type == unix.TMPFS_MAGIC {
80
if err := relocateRootFS(); err != nil {
81
log.Fatalf("Cannot relocate rootfs: %v", err)
82
0 commit comments