Deleted Added
full compact
syscalls.c (101282) syscalls.c (101283)
1/*
2 * Copryight 1997 Sean Eric Fagan
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

--- 17 unchanged lines hidden (view full) ---

26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
30 */
31
32#ifndef lint
33static const char rcsid[] =
1/*
2 * Copryight 1997 Sean Eric Fagan
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

--- 17 unchanged lines hidden (view full) ---

26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
30 */
31
32#ifndef lint
33static const char rcsid[] =
34 "$FreeBSD: head/usr.bin/truss/syscalls.c 101282 2002-08-04 00:46:48Z mdodd $";
34 "$FreeBSD: head/usr.bin/truss/syscalls.c 101283 2002-08-04 01:02:52Z mdodd $";
35#endif /* not lint */
36
37/*
38 * This file has routines used to print out system calls and their
39 * arguments.
40 */
41
42#include <sys/types.h>

--- 309 unchanged lines hidden (view full) ---

352 * nargs is the number of arguments (not the number of words; this is
353 * potentially confusing, I know).
354 */
355
356void
357print_syscall(struct trussinfo *trussinfo, const char *name, int nargs, char **s_args) {
358 int i;
359 int len = 0;
35#endif /* not lint */
36
37/*
38 * This file has routines used to print out system calls and their
39 * arguments.
40 */
41
42#include <sys/types.h>

--- 309 unchanged lines hidden (view full) ---

352 * nargs is the number of arguments (not the number of words; this is
353 * potentially confusing, I know).
354 */
355
356void
357print_syscall(struct trussinfo *trussinfo, const char *name, int nargs, char **s_args) {
358 int i;
359 int len = 0;
360
361 if (trussinfo->flags & FOLLOWFORKS)
362 len += fprintf(trussinfo->outfile, "%5d: ", trussinfo->pid);
363
360 len += fprintf(trussinfo->outfile, "%s(", name);
364 len += fprintf(trussinfo->outfile, "%s(", name);
365
361 for (i = 0; i < nargs; i++) {
362 if (s_args[i])
363 len += fprintf(trussinfo->outfile, "%s", s_args[i]);
364 else
365 len += fprintf(trussinfo->outfile, "<missing argument>");
366 len += fprintf(trussinfo->outfile, "%s", i < (nargs - 1) ? "," : "");
367 }
368 len += fprintf(trussinfo->outfile, ")");

--- 13 unchanged lines hidden ---
366 for (i = 0; i < nargs; i++) {
367 if (s_args[i])
368 len += fprintf(trussinfo->outfile, "%s", s_args[i]);
369 else
370 len += fprintf(trussinfo->outfile, "<missing argument>");
371 len += fprintf(trussinfo->outfile, "%s", i < (nargs - 1) ? "," : "");
372 }
373 len += fprintf(trussinfo->outfile, ")");

--- 13 unchanged lines hidden ---