aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/vminfo/syscalls.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/vminfo/syscalls.go')
-rw-r--r--pkg/vminfo/syscalls.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/pkg/vminfo/syscalls.go b/pkg/vminfo/syscalls.go
index 178e5d52c..707ab6543 100644
--- a/pkg/vminfo/syscalls.go
+++ b/pkg/vminfo/syscalls.go
@@ -161,7 +161,7 @@ func (ctx *checkContext) supportedSyscalls(names []string) string {
}
func supportedOpenat(ctx *checkContext, call *prog.Syscall) string {
- fname, ok := extractStringConst(call.Args[1].Type)
+ fname, ok := extractStringConst(call.Args[1].Type, call.Attrs.Automatic)
if !ok || fname[0] != '/' {
return ""
}
@@ -277,7 +277,10 @@ func alwaysSupported(ctx *checkContext, call *prog.Syscall) string {
return ""
}
-func extractStringConst(typ prog.Type) (string, bool) {
+func extractStringConst(typ prog.Type, isAutomatic bool) (string, bool) {
+ if isAutomatic {
+ return "", false
+ }
ptr, ok := typ.(*prog.PtrType)
if !ok {
panic("first open arg is not a pointer to string const")