Deleted Added
full compact
34c34
< "$FreeBSD: head/usr.bin/truss/syscalls.c 286914 2015-08-19 01:44:56Z jhb $";
---
> "$FreeBSD: head/usr.bin/truss/syscalls.c 286938 2015-08-19 20:02:03Z jhb $";
626,628c626,630
< /* Searches an xlat array containing bitfield values. Remaining bits
< set after removing the known ones are printed at the end:
< IN|0x400 */
---
> /*
> * Searches an xlat array containing bitfield values. Remaining bits
> * set after removing the known ones are printed at the end:
> * IN|0x400.
> */
639,640c641,644
< /* don't print the "all-bits-zero" string unless all
< bits are really zero */
---
> /*
> * Don't print the "all-bits-zero" string unless all
> * bits are really zero.
> */
647c651,655
< /* if we have leftover bits or didn't match anything */
---
>
> /*
> * If we have leftover bits or didn't match anything, print
> * the remainder.
> */
660d667
<
678,679d684
< * get_struct
< *
682d686
<
700d703
< * get_string
828d830
< * print_arg
830,832c832
< * allocated via malloc(), so needs to be free()'d. The file
< * descriptor is for the process' memory (via /proc), and is used
< * to get any data (where the argument is a pointer). sc is
---
> * allocated via malloc(), so needs to be free()'d. sc is
836d835
<
866a866
>
873,876c873,878
< /* Binary block of data that might have printable characters.
< XXX If type|OUT, assume that the length is the syscall's
< return value. Otherwise, assume that the length of the block
< is in the next syscall argument. */
---
> /*
> * Binary block of data that might have printable characters.
> * XXX If type|OUT, assume that the length is the syscall's
> * return value. Otherwise, assume that the length of the block
> * is in the next syscall argument.
> */
878c880
< char tmp2[max_string+1], *tmp3;
---
> char tmp2[max_string + 1], *tmp3;
887,889c889,892
< /* Don't print more than max_string characters, to avoid word
< wrap. If we have to truncate put some ... after the string.
< */
---
> /*
> * Don't print more than max_string characters, to avoid word
> * wrap. If we have to truncate put some ... after the string.
> */
951a955
>
961a966
>
970c975,979
< const char *temp = ioctlname(args[sc->offset]);
---
> const char *temp;
> unsigned long cmd;
>
> cmd = args[sc->offset];
> temp = ioctlname(cmd);
974d982
< unsigned long arg = args[sc->offset];
976,979c984,987
< arg, arg & IOC_OUT ? "R" : "",
< arg & IOC_IN ? "W" : "", IOCGROUP(arg),
< isprint(IOCGROUP(arg)) ? (char)IOCGROUP(arg) : '?',
< arg & 0xFF, IOCPARM_LEN(arg));
---
> cmd, cmd & IOC_OUT ? "R" : "",
> cmd & IOC_IN ? "W" : "", IOCGROUP(cmd),
> isprint(IOCGROUP(cmd)) ? (char)IOCGROUP(cmd) : '?',
> cmd & 0xFF, IOCPARM_LEN(cmd));
984a993
>
1024a1034
>
1034a1045
>
1045a1057
>
1059a1072
>
1157,1158c1170,1171
< /* XXX output depends on the value of the previous argument */
< switch (args[sc->offset-1]) {
---
> /* XXX: Output depends on the value of the previous argument. */
> switch (args[sc->offset - 1]) {
1290c1303
< inet_ntop(AF_INET, &lsin->sin_addr, addr, sizeof addr);
---
> inet_ntop(AF_INET, &lsin->sin_addr, addr, sizeof(addr));
1297c1310
< sizeof addr);
---
> sizeof(addr));
1339,1340c1352,1353
< * XXX XXX: the size of the array is determined by either the
< * next syscall argument, or by the syscall returnvalue,
---
> * XXX XXX: The size of the array is determined by either the
> * next syscall argument, or by the syscall return value,
1378a1392
>
1381a1396
>
1393a1409
>
1406a1423
>
1476d1492
< * print_syscall
1481d1496
<