[Xfce4-commits] [panel-plugins/xfce4-netload-plugin] 02/02: Add bufBullshit value in commandline test program

noreply at xfce.org noreply at xfce.org
Sat Nov 15 23:56:59 CET 2014


This is an automated email from the git hooks/post-receive script.

mmassonnet pushed a commit to branch master
in repository panel-plugins/xfce4-netload-plugin.

commit 8fb438ce45e9a098586b8a94a6cfdc9cb4491fde
Author: Mike Massonnet <m8t at gandi.net>
Date:   Sat Nov 15 23:56:33 2014 +0100

    Add bufBullshit value in commandline test program
---
 panel-plugin/commandline.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/panel-plugin/commandline.c b/panel-plugin/commandline.c
index 8dfb4fb..754d1e4 100644
--- a/panel-plugin/commandline.c
+++ b/panel-plugin/commandline.c
@@ -49,7 +49,7 @@ int main(int argc, char* argv[])
 {
     unsigned long in, out, tot;
     char* device;
-    char bufIn[20], bufOut[20], bufTot[20];
+    char bufIn[20], bufOut[20], bufTot[20], bufBS[20];
     struct sigaction sig_struct;
     
     /* Signal fuer's Beenden */
@@ -75,9 +75,10 @@ int main(int argc, char* argv[])
         get_current_netload(&data, &in, &out, &tot);
         format_byte_humanreadable(bufIn, 20, (double)in, 0, FALSE);
         format_byte_humanreadable(bufOut, 20, (double)out, 0, FALSE);
-        format_byte_humanreadable(bufTot, 20, (double)tot, 0, FALSE);
-        printf("Current netload:\nIN : %s\nOUT: %s\nTOT: %s\nIP: %s\n", 
-            bufIn, bufOut, bufTot, get_ip_address(&data));
+        format_byte_humanreadable(bufTot, 20, (double)tot, 2, TRUE);
+        format_byte_humanreadable(bufBS, 20, 12235345.0, 2, TRUE);
+        printf("Current netload:\nIN : %s\nOUT: %s\nTOT: %s\nBS: %s\nIP: %s\n",
+            bufIn, bufOut, bufTot, bufBS, get_ip_address(&data));
         sleep(1);
     }
     

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list