@@ -65,19 +65,19 @@ LineReader:
65
65
case io .EOF :
66
66
break LineReader
67
67
case nil :
68
+ // strip eol
69
+ line = strings .Trim (line , "\n " )
70
+
71
+ // split and parse entries acording to section 3.5 in
72
+ // https://www.kernel.org/doc/Documentation/filesystems/proc.txt
73
+ // TODO: whitespaces and control chars in names are encoded as
74
+ // octal values (e.g. for "x x": "x\040x") what should be expanded
75
+ // in both mount point source and target
76
+ parts := strings .Split (line , " " )
77
+ mi [parts [4 ]] = mountEntry {Source : parts [9 ], Fs : parts [8 ]}
78
+ default :
68
79
return mountPointChecker {}, err
69
80
}
70
-
71
- // strip eol
72
- line = strings .Trim (line , "\n " )
73
-
74
- // split and parse entries acording to section 3.5 in
75
- // https://www.kernel.org/doc/Documentation/filesystems/proc.txt
76
- // TODO: whitespaces and control chars in names are encoded as
77
- // octal values (e.g. for "x x": "x\040x") what should be expanded
78
- // in both mount point source and target
79
- parts := strings .Split (line , " " )
80
- mi [parts [4 ]] = mountEntry {Source : parts [9 ], Fs : parts [8 ]}
81
81
}
82
82
return mountPointChecker {mountInfo : mi }, nil
83
83
}
@@ -107,7 +107,7 @@ func (mpc mountPointChecker) IsPathAnNs(path string) bool {
107
107
if ! isMountPoint {
108
108
return false
109
109
}
110
- return entry .Fs == "nsfs"
110
+ return entry .Fs == "nsfs" || entry . Fs == "proc"
111
111
}
112
112
113
113
type fakeMountPointChecker struct {}
0 commit comments