]> git.pld-linux.org Git - packages/bcm5820.git/blame - bcm5820-noclear.patch
- one more header
[packages/bcm5820.git] / bcm5820-noclear.patch
CommitLineData
cfe0e8cf
JB
1Add a -n option which inhibits screen clearing when we're not in loop mode.
2--- ./stats/stats.c 2002-11-04 16:15:45.000000000 -0500
3+++ ./stats/stats.c 2002-11-04 16:15:38.000000000 -0500
4@@ -72,7 +72,8 @@
5 key_mode = 0x0002,\r
6 ssl_mode = 0x0004,\r
7 loop_mode = 0x0100,\r
8- verbose_mode = 0x0200\r
9+ verbose_mode = 0x0200,\r
10+ clear_mode = 0x8000\r
11 };\r
12 \r
13 \r
14@@ -194,7 +195,8 @@
15 \r
16 int i;\r
17 \r
18- system("clear");\r
19+ if(control_word & (clear_mode | loop_mode))\r
20+ system("clear");\r
21 stats_printHeaderSimple(control_word);\r
22 \r
23 if(current_device == num_devices)\r
24@@ -220,7 +222,8 @@
25 \r
26 int i;\r
27 \r
28- system("clear");\r
29+ if(control_word & (clear_mode | loop_mode))\r
30+ system("clear");\r
31 stats_printHeaderVerbose(control_word);\r
32 \r
33 if(current_device == num_devices)\r
34@@ -357,6 +360,7 @@
35 printf("\t-v\t\tVerbose mode. Show more detailed statistics information\n\t\t\tincluding rate information.\n\n");\r
36 printf("\t-s [num]\tShow statistics for specified device only. Default is\n\t\t\tall devices.\n\n");\r
37 printf("\t-c\t\tShow statistics for crypto operations. Default is key\n\t\t\toperations only.\n\n");\r
38+ printf("\t-n\t\tAvoid clearing the screen when not in loop mode.\n\n");\r
39 printf("\t-h\t\tDisplay usage information.\n\n");\r
40 }\r
41 \r
42@@ -384,10 +388,11 @@
43 interval = 3;\r
44 control_word = 0;\r
45 control_word |= key_mode;\r
46+ control_word |= clear_mode;\r
47 \r
48 bzero(prev_stats, sizeof(ubsec_stats_t));\r
49 \r
50- while ((c = getopt(argc, argv, "LlVvS:s:I:i:CcDdKkHh?")) != -1) {\r
51+ while ((c = getopt(argc, argv, "LlVvS:s:I:i:CcDdKknHh?")) != -1) {\r
52 switch (c) {\r
53 case 'L':\r
54 case 'l':\r
55@@ -420,6 +425,9 @@
56 control_word &= (control_word & ~crypto_mode);\r
57 control_word |= key_mode;\r
58 break;\r
59+ case 'n':\r
60+ control_word &= (control_word & ~clear_mode);\r
61+ break;\r
62 case 'H':\r
63 case 'h':\r
64 case '?':\r
This page took 0.140699 seconds and 5 git commands to generate.