net.c: when printing struct msghdr.msg_control, also print its name

* net.c (printcmsghdr): Skip control messages of zero length.
Always print "msg_control=" before the control message.
(do_msghdr): Print control message before its length, not after.
* tests/inet-cmsg.c (main): Update expected output.
* tests/scm_rights-fd.test: Likewise.
3 files changed
tree: a8dca9dd2812009107db7147f3f4350e4e403bf2
  1. debian/
  2. linux/
  3. m4/
  4. maint/
  5. qemu_multiarch_testing/
  6. test/
  7. tests/
  8. xlat/
  9. .gitignore
  10. .mailmap
  11. .travis.yml
  12. access.c
  13. affinity.c
  14. aio.c
  15. alpha.c
  16. AUTHORS
  17. bjm.c
  18. block.c
  19. bootstrap
  20. bpf.c
  21. btrfs.c
  22. build_static_example.sh
  23. cacheflush.c
  24. capability.c
  25. caps0.h
  26. caps1.h
  27. ChangeLog-CVS
  28. chdir.c
  29. chmod.c
  30. clone.c
  31. configure.ac
  32. copy_file_range.c
  33. COPYING
  34. count.c
  35. CREDITS.in
  36. defs.h
  37. desc.c
  38. dirent.c
  39. dirent64.c
  40. empty.h
  41. epoll.c
  42. errnoent.sh
  43. evdev.c
  44. eventfd.c
  45. execve.c
  46. exit.c
  47. fadvise.c
  48. fallocate.c
  49. fanotify.c
  50. fchownat.c
  51. fcntl.c
  52. fetch_seccomp_fprog.c
  53. fetch_struct_flock.c
  54. fetch_struct_statfs.c
  55. file.c
  56. file_handle.c
  57. file_ioctl.c
  58. flock.c
  59. flock.h
  60. fs_x_ioctl.c
  61. fstatfs.c
  62. fstatfs64.c
  63. futex.c
  64. gcc_compat.h
  65. generate_mpers_am.sh
  66. generate_sen.sh
  67. generate_xlat_in.sh
  68. get_robust_list.c
  69. getcpu.c
  70. getcwd.c
  71. getrandom.c
  72. git-set-file-times
  73. git-version-gen
  74. gitlog-to-changelog
  75. HACKING-scripts
  76. hdio.c
  77. hostname.c
  78. inotify.c
  79. INSTALL
  80. io.c
  81. ioctl.c
  82. ioctlsort.c
  83. ioperm.c
  84. iopl.c
  85. ioprio.c
  86. ipc_defs.h
  87. ipc_msg.c
  88. ipc_msgctl.c
  89. ipc_sem.c
  90. ipc_shm.c
  91. ipc_shmctl.c
  92. kcmp.c
  93. kernel_types.h
  94. kexec.c
  95. keyctl.c
  96. ldt.c
  97. link.c
  98. lookup_dcookie.c
  99. loop.c
  100. lseek.c
  101. make-dist
  102. make-dsc
  103. Makefile.am
  104. mem.c
  105. membarrier.c
  106. memfd_create.c
  107. mknod.c
  108. mount.c
  109. mpers.awk
  110. mpers.sh
  111. mpers_test.sh
  112. mpers_type.h
  113. mq.c
  114. mtd.c
  115. native_defs.h
  116. net.c
  117. NEWS
  118. numa.c
  119. open.c
  120. or1k_atomic.c
  121. pathtrace.c
  122. perf.c
  123. personality.c
  124. poll.c
  125. prctl.c
  126. print_mq_attr.c
  127. print_msgbuf.c
  128. print_sigevent.c
  129. print_statfs.c
  130. print_time.c
  131. print_timex.c
  132. printmode.c
  133. printrusage.c
  134. printsiginfo.c
  135. printsiginfo.h
  136. printstat.h
  137. process.c
  138. process_vm.c
  139. ptp.c
  140. ptrace.h
  141. quota.c
  142. readahead.c
  143. readlink.c
  144. README
  145. README-hacking
  146. README-linux-ptrace
  147. README-mpers
  148. README.md
  149. reboot.c
  150. regs.h
  151. renameat.c
  152. resource.c
  153. rtc.c
  154. sched.c
  155. scsi.c
  156. seccomp.c
  157. seccomp_fprog.h
  158. sendfile.c
  159. sigaltstack.c
  160. sigevent.h
  161. signal.c
  162. signalent.sh
  163. signalfd.c
  164. sigreturn.c
  165. sock.c
  166. sockaddr.c
  167. socketutils.c
  168. sram_alloc.c
  169. statfs.c
  170. statfs.h
  171. statfs64.c
  172. strace-graph
  173. strace-log-merge
  174. strace.1
  175. strace.c
  176. strace.spec.in
  177. swapon.c
  178. sync_file_range.c
  179. sync_file_range2.c
  180. syscall.c
  181. syscallent.sh
  182. sysctl.c
  183. sysinfo.c
  184. syslog.c
  185. sysmips.c
  186. term.c
  187. time.c
  188. times.c
  189. travis-build.sh
  190. travis-install.sh
  191. travis-success.sh
  192. truncate.c
  193. ubi.c
  194. uid.c
  195. uid16.c
  196. umask.c
  197. umount.c
  198. uname.c
  199. unwind.c
  200. upeek.c
  201. userfaultfd.c
  202. util.c
  203. utime.c
  204. utimes.c
  205. v4l2.c
  206. vsprintf.c
  207. wait.c
  208. xattr.c
  209. xlat.h
  210. xlate.el
  211. xmalloc.c
README.md

This is strace -- a diagnostic, debugging and instructional userspace utility for Linux. It is used to monitor interactions between processes and the Linux kernel, which include system calls, signal deliveries, and changes of process state. The operation of strace is made possible by the kernel feature known as ptrace.

strace is released under a Berkeley-style license at the request of Paul Kranenburg; see the file COPYING for details.

See the file NEWS for information on what has changed in recent versions.

Please send bug reports and enhancements to the strace mailing list.

Build Status Code Coverage