v1.14.5
FIXED: * Renamed sysutils.NsToFD to sysutils.NsToInode because that number's an inode, not an FD. D'oh.
This commit is contained in:
parent
acb4352113
commit
675a10addd
@ -52,8 +52,8 @@ func GetIDState() (ids IDState) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// NsToFD splits a namespace identifier (e.g. `net:[12345]`) to its type (e.g. `net`) and FD (e.g. `12345`).
|
// NsToInode splits a namespace identifier (e.g. `net:[12345]`) to its type (e.g. `net`) and inode (e.g. `12345`).
|
||||||
func NsToFD(ns string) (typ string, fd uint64, err error) {
|
func NsToInode(ns string) (typ string, inode uint64, err error) {
|
||||||
|
|
||||||
var fields []string
|
var fields []string
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ func NsToFD(ns string) (typ string, fd uint64, err error) {
|
|||||||
fields[1] = strings.TrimPrefix(fields[1], "[")
|
fields[1] = strings.TrimPrefix(fields[1], "[")
|
||||||
fields[1] = strings.TrimSuffix(fields[1], "]")
|
fields[1] = strings.TrimSuffix(fields[1], "]")
|
||||||
|
|
||||||
if fd, err = strconv.ParseUint(fields[1], 10, 64); err != nil {
|
if inode, err = strconv.ParseUint(fields[1], 10, 64); err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user