svn commit: r292265 - head/share/man/man4

Christian Brueffer brueffer at FreeBSD.org
Tue Dec 15 13:29:06 UTC 2015


Author: brueffer
Date: Tue Dec 15 13:29:05 2015
New Revision: 292265
URL: https://svnweb.freebsd.org/changeset/base/292265

Log:
  Fix example code rendering, \n needs escaping to show up.
  
  PR:		203536
  Submitted by:	Fabian Keil

Modified:
  head/share/man/man4/dtrace_io.4
  head/share/man/man4/dtrace_ip.4
  head/share/man/man4/dtrace_tcp.4
  head/share/man/man4/dtrace_udp.4

Modified: head/share/man/man4/dtrace_io.4
==============================================================================
--- head/share/man/man4/dtrace_io.4	Tue Dec 15 13:17:40 2015	(r292264)
+++ head/share/man/man4/dtrace_io.4	Tue Dec 15 13:29:05 2015	(r292265)
@@ -91,8 +91,8 @@ io:::start
 
 END
 {
-        printf("%10s %20s %10s %15s\n", "DEVICE", "APP", "PID", "BYTES");
-        printa("%10s %20s %10d %15 at d\n", @);
+        printf("%10s %20s %10s %15s\\n", "DEVICE", "APP", "PID", "BYTES");
+        printa("%10s %20s %10d %15 at d\\n", @);
 }
 .Ed
 .Sh COMPATIBILITY

Modified: head/share/man/man4/dtrace_ip.4
==============================================================================
--- head/share/man/man4/dtrace_ip.4	Tue Dec 15 13:17:40 2015	(r292264)
+++ head/share/man/man4/dtrace_ip.4	Tue Dec 15 13:29:05 2015	(r292265)
@@ -239,7 +239,7 @@ by the kernel:
 
 dtrace:::BEGIN
 {
-        printf(" %10s %30s    %-30s %8s %6s\n", "DELTA(us)", "SOURCE",
+        printf(" %10s %30s    %-30s %8s %6s\\n", "DELTA(us)", "SOURCE",
             "DEST", "INT", "BYTES");
         last = timestamp;
 }
@@ -247,7 +247,7 @@ dtrace:::BEGIN
 ip:::send
 {
         this->elapsed = (timestamp - last) / 1000;
-        printf(" %10d %30s -> %-30s %8s %6d\n", this->elapsed,
+        printf(" %10d %30s -> %-30s %8s %6d\\n", this->elapsed,
             args[2]->ip_saddr, args[2]->ip_daddr, args[3]->if_name,
             args[2]->ip_plength);
         last = timestamp;
@@ -256,7 +256,7 @@ ip:::send
 ip:::receive
 {
         this->elapsed = (timestamp - last) / 1000;
-        printf(" %10d %30s <- %-30s %8s %6d\n", this->elapsed,
+        printf(" %10d %30s <- %-30s %8s %6d\\n", this->elapsed,
             args[2]->ip_daddr, args[2]->ip_saddr, args[3]->if_name,
             args[2]->ip_plength);
         last = timestamp;

Modified: head/share/man/man4/dtrace_tcp.4
==============================================================================
--- head/share/man/man4/dtrace_tcp.4	Tue Dec 15 13:17:40 2015	(r292264)
+++ head/share/man/man4/dtrace_tcp.4	Tue Dec 15 13:29:05 2015	(r292265)
@@ -300,7 +300,7 @@ The following script logs TCP segments i
 
 dtrace:::BEGIN
 {
-        printf(" %3s %15s:%-5s      %15s:%-5s %6s  %s\n", "CPU",
+        printf(" %3s %15s:%-5s      %15s:%-5s %6s  %s\\n", "CPU",
             "LADDR", "LPORT", "RADDR", "RPORT", "BYTES", "FLAGS");
 }
 
@@ -317,7 +317,7 @@ tcp:::send
         printf("%s", args[4]->tcp_flags & TH_ACK ? "ACK|" : "");
         printf("%s", args[4]->tcp_flags & TH_URG ? "URG|" : "");
         printf("%s", args[4]->tcp_flags == 0 ? "null " : "");
-        printf("\b)\n");
+        printf("\b)\\n");
 }
 
 tcp:::receive
@@ -333,7 +333,7 @@ tcp:::receive
         printf("%s", args[4]->tcp_flags & TH_ACK ? "ACK|" : "");
         printf("%s", args[4]->tcp_flags & TH_URG ? "URG|" : "");
         printf("%s", args[4]->tcp_flags == 0 ? "null " : "");
-        printf("\b)\n");
+        printf("\b)\\n");
 }
 .Ed
 The following script logs TCP connection state changes as they occur:
@@ -345,14 +345,14 @@ int last[int];
 
 dtrace:::BEGIN
 {
-        printf("   %12s %-20s    %-20s %s\n",
+        printf("   %12s %-20s    %-20s %s\\n",
             "DELTA(us)", "OLD", "NEW", "TIMESTAMP");
 }
 
 tcp:::state-change
 {
         this->elapsed = (timestamp - last[args[1]->cs_cid]) / 1000;
-        printf("   %12d %-20s -> %-20s %d\n", this->elapsed,
+        printf("   %12d %-20s -> %-20s %d\\n", this->elapsed,
             tcp_state_string[args[5]->tcps_state],
             tcp_state_string[args[3]->tcps_state], timestamp);
         last[args[1]->cs_cid] = timestamp;
@@ -361,7 +361,7 @@ tcp:::state-change
 tcp:::state-change
 /last[args[1]->cs_cid] == 0/
 {
-        printf("   %12s %-20s -> %-20s %d\n", "-",
+        printf("   %12s %-20s -> %-20s %d\\n", "-",
             tcp_state_string[args[5]->tcps_state],
             tcp_state_string[args[3]->tcps_state], timestamp);
         last[args[1]->cs_cid] = timestamp;

Modified: head/share/man/man4/dtrace_udp.4
==============================================================================
--- head/share/man/man4/dtrace_udp.4	Tue Dec 15 13:17:40 2015	(r292264)
+++ head/share/man/man4/dtrace_udp.4	Tue Dec 15 13:29:05 2015	(r292265)
@@ -151,7 +151,7 @@ by the kernel:
 
 dtrace:::BEGIN
 {
-        printf(" %10s %36s    %-36s %6s\n", "DELTA(us)", "SOURCE",
+        printf(" %10s %36s    %-36s %6s\\n", "DELTA(us)", "SOURCE",
             "DEST", "BYTES");
         last = timestamp;
 }
@@ -161,7 +161,7 @@ udp:::send
         this->elapsed = (timestamp - last) / 1000;
         self->dest = strjoin(strjoin(args[2]->ip_daddr, ":"),
              lltostr(args[4]->udp_dport));
-        printf(" %10d %30s:%-5d -> %-36s %6d\n", this->elapsed,
+        printf(" %10d %30s:%-5d -> %-36s %6d\\n", this->elapsed,
             args[2]->ip_saddr, args[4]->udp_sport,
             self->dest, args[4]->udp_length);
         last = timestamp;
@@ -172,7 +172,7 @@ udp:::receive
         this->elapsed = (timestamp - last) / 1000;
         self->dest = strjoin(strjoin(args[2]->ip_saddr, ":"),
              lltostr(args[4]->udp_sport));
-        printf(" %10d %30s:%-5d <- %-36s %6d\n", this->elapsed,
+        printf(" %10d %30s:%-5d <- %-36s %6d\\n", this->elapsed,
             args[2]->ip_daddr, args[4]->udp_dport,
             self->dest, args[4]->udp_length);
         last = timestamp;


More information about the svn-src-head mailing list