Deleted Added
full compact
33c33
< __FBSDID("$FreeBSD: head/usr.bin/truss/setup.c 288424 2015-09-30 19:13:32Z jhb $");
---
> __FBSDID("$FreeBSD: head/usr.bin/truss/setup.c 288832 2015-10-05 18:08:35Z bdrewery $");
344,354c344,346
< sc = get_syscall(t->cs.name);
< if (sc) {
< t->cs.nargs = sc->nargs;
< assert(sc->nargs <= nitems(t->cs.s_args));
< } else {
< #if DEBUG
< fprintf(stderr, "unknown syscall %s -- setting "
< "args to %d\n", t->cs.name, t->cs.nargs);
< #endif
< t->cs.nargs = narg;
< }
---
> sc = get_syscall(t->cs.name, narg);
> t->cs.nargs = sc->nargs;
> assert(sc->nargs <= nitems(t->cs.s_args));
375c367
< if (sc && !(sc->args[i].type & OUT)) {
---
> if (!(sc->args[i].type & OUT)) {
410,419c402,407
< if (sc == NULL) {
< for (i = 0; i < t->cs.nargs; i++)
< asprintf(&t->cs.s_args[i], "0x%lx", t->cs.args[i]);
< } else {
< /*
< * Here, we only look for arguments that have OUT masked in --
< * otherwise, they were handled in enter_syscall().
< */
< for (i = 0; i < sc->nargs; i++) {
< char *temp;
---
> /*
> * Here, we only look for arguments that have OUT masked in --
> * otherwise, they were handled in enter_syscall().
> */
> for (i = 0; i < sc->nargs; i++) {
> char *temp;
421,433c409,419
< if (sc->args[i].type & OUT) {
< /*
< * If an error occurred, then don't bother
< * getting the data; it may not be valid.
< */
< if (errorp) {
< asprintf(&temp, "0x%lx",
< t->cs.args[sc->args[i].offset]);
< } else {
< temp = print_arg(&sc->args[i],
< t->cs.args, retval, info);
< }
< t->cs.s_args[i] = temp;
---
> if (sc->args[i].type & OUT) {
> /*
> * If an error occurred, then don't bother
> * getting the data; it may not be valid.
> */
> if (errorp) {
> asprintf(&temp, "0x%lx",
> t->cs.args[sc->args[i].offset]);
> } else {
> temp = print_arg(&sc->args[i],
> t->cs.args, retval, info);
434a421
> t->cs.s_args[i] = temp;