mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Adds support level documentation for all syscalls. Removes the Undocumented utility function to discourage usage while leaving SupportUndocumented as the default support level for Syscall structs. PiperOrigin-RevId: 256281927
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -40,16 +40,7 @@ func Supported(name string, fn kernel.SyscallFn) kernel.Syscall {
|
||||
Name: name,
|
||||
Fn: fn,
|
||||
SupportLevel: kernel.SupportFull,
|
||||
Note: "Full Support",
|
||||
}
|
||||
}
|
||||
|
||||
// Undocumented returns a syscall that is undocumented.
|
||||
func Undocumented(name string, fn kernel.SyscallFn) kernel.Syscall {
|
||||
return kernel.Syscall{
|
||||
Name: name,
|
||||
Fn: fn,
|
||||
SupportLevel: kernel.SupportUndocumented,
|
||||
Note: "Fully Supported.",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,7 +66,7 @@ func Error(name string, err syscall.Errno, note string, urls []string) kernel.Sy
|
||||
return 0, nil, err
|
||||
},
|
||||
SupportLevel: kernel.SupportUnimplemented,
|
||||
Note: fmt.Sprintf("%sReturns %q", note, err.Error()),
|
||||
Note: fmt.Sprintf("%sReturns %q.", note, err.Error()),
|
||||
URLs: urls,
|
||||
}
|
||||
}
|
||||
@@ -93,7 +84,7 @@ func ErrorWithEvent(name string, err syscall.Errno, note string, urls []string)
|
||||
return 0, nil, err
|
||||
},
|
||||
SupportLevel: kernel.SupportUnimplemented,
|
||||
Note: fmt.Sprintf("%sReturns %q", note, err.Error()),
|
||||
Note: fmt.Sprintf("%sReturns %q.", note, err.Error()),
|
||||
URLs: urls,
|
||||
}
|
||||
}
|
||||
@@ -115,7 +106,7 @@ func CapError(name string, c linux.Capability, note string, urls []string) kerne
|
||||
return 0, nil, syserror.ENOSYS
|
||||
},
|
||||
SupportLevel: kernel.SupportUnimplemented,
|
||||
Note: fmt.Sprintf("%sReturns %q if the process does not have %s; %q otherwise", note, syserror.EPERM, c.String(), syserror.ENOSYS),
|
||||
Note: fmt.Sprintf("%sReturns %q if the process does not have %s; %q otherwise.", note, syserror.EPERM, c.String(), syserror.ENOSYS),
|
||||
URLs: urls,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user