Changeset View
Changeset View
Standalone View
Standalone View
usr.bin/truss/syscalls.c
Context not available. | |||||
#define _WANT_FREEBSD11_KEVENT | #define _WANT_FREEBSD11_KEVENT | ||||
#include <sys/event.h> | #include <sys/event.h> | ||||
#include <sys/ioccom.h> | #include <sys/ioccom.h> | ||||
#include <sys/mman.h> | |||||
#include <sys/mount.h> | #include <sys/mount.h> | ||||
#include <sys/ptrace.h> | #include <sys/ptrace.h> | ||||
#include <sys/resource.h> | #include <sys/resource.h> | ||||
Context not available. | |||||
.args = { { Int, 0 }, { Sockoptlevel, 1 }, { Sockoptname, 2 }, | .args = { { Int, 0 }, { Sockoptlevel, 1 }, { Sockoptname, 2 }, | ||||
{ Ptr | IN, 3 }, { Socklent, 4 } } }, | { Ptr | IN, 3 }, { Socklent, 4 } } }, | ||||
{ .name = "shm_open", .ret_type = 1, .nargs = 3, | { .name = "shm_open", .ret_type = 1, .nargs = 3, | ||||
.args = { { Name | IN, 0 }, { Open, 1 }, { Octal, 2 } } }, | .args = { { ShmName | IN, 0 }, { Open, 1 }, { Octal, 2 } } }, | ||||
{ .name = "shm_unlink", .ret_type = 1, .nargs = 1, | { .name = "shm_unlink", .ret_type = 1, .nargs = 1, | ||||
.args = { { Name | IN, 0 } } }, | .args = { { Name | IN, 0 } } }, | ||||
{ .name = "shutdown", .ret_type = 1, .nargs = 2, | { .name = "shutdown", .ret_type = 1, .nargs = 2, | ||||
Context not available. | |||||
case Sizet: | case Sizet: | ||||
fprintf(fp, "%zu", (size_t)args[sc->offset]); | fprintf(fp, "%zu", (size_t)args[sc->offset]); | ||||
break; | break; | ||||
case ShmName: | |||||
/* Handle special SHM_ANON value. */ | |||||
if ((char *)args[sc->offset] == SHM_ANON) { | |||||
jhb: No space after cast in FreeBSD's style. | |||||
fprintf(fp, "SHM_ANON"); | |||||
break; | |||||
} | |||||
/* FALLTHROUGH */ | |||||
Done Inline ActionsBest to use the style-mandated '/* FALLTHROUGH */' as it is also recognized by compilers and static analyzers. jhb: Best to use the style-mandated '/* FALLTHROUGH */' as it is also recognized by compilers and… | |||||
case Name: { | case Name: { | ||||
/* NULL-terminated string. */ | /* NULL-terminated string. */ | ||||
char *tmp2; | char *tmp2; | ||||
Context not available. |
No space after cast in FreeBSD's style.