Skip to content

Commit

Permalink
syscallinfo: fix typo for oldlstat
Browse files Browse the repository at this point in the history
There seems to be a typo for SYS_OLDLSTAT. The name should be oldlstat
rather than oldstat.

Looking at the i386/linux.go file:
$ grep -e 'OLDL\?STAT' ./pkg/syscallinfo/i386/linux.go
        SYS_OLDSTAT                      = 18
        SYS_OLDLSTAT                     = 84

Verified the number with:
$ cat oldlstat.c
int main(int argc, char **argv)
{
        printf("SYS_oldlstat:%d\n", SYS_oldlstat);
        return 0;
}
$ gcc -Wall -m32 oldlstat.c -o oldlstat
$ ./oldlstat
SYS_oldlstat:84

Signed-off-by: Kornilios Kourtis <kornilios@isovalent.com>
  • Loading branch information
kkourt committed Jun 15, 2024
1 parent 1eea47b commit 96a12d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/syscallinfo/syscallnames_amd64.go
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ var syscallNames32 = map[int]string{
i386.SYS_SETGROUPS: "sys_setgroups",
i386.SYS_SELECT: "sys_select",
i386.SYS_SYMLINK: "sys_symlink",
i386.SYS_OLDLSTAT: "sys_oldstat",
i386.SYS_OLDLSTAT: "sys_oldlstat",
i386.SYS_READLINK: "sys_readlink",
i386.SYS_USELIB: "sys_uselib",
i386.SYS_SWAPON: "sys_swapon",
Expand Down

0 comments on commit 96a12d9

Please sign in to comment.