WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] xentop.c trivial fix

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] xentop.c trivial fix
From: Peter <p.spamcatcher@xxxxxxxxxxxxxxx>
Date: Mon, 08 Jan 2007 09:43:18 +1300
Delivery-date: Mon, 08 Jan 2007 01:28:12 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.9 (X11/20061206)
Hi.

I run:
xentop --delay=30 --iterations 2 --batch

I get output, 30 second delay, output, 30 second delay, exit.

I want output, 30 seconds delay, output, exit.

The following patch implements that behavior and I think this is likely
the desired behavior anyway.  i.e. just a trivial bug in code.

# diff -U5 xentop.c.orig xentop.c
--- xentop.c.orig       2006-12-29 08:05:13.000000000 +0000
+++ xentop.c    2006-12-29 08:06:40.000000000 +0000
@@ -1053,13 +1053,13 @@
        } else {
                        do {
                                gettimeofday(&curtime, NULL);
                                top();
                                oldtime = curtime;
-                               sleep(delay);
                                if ((!loop) && !(--iterations))
                                        break;
+                               sleep(delay);
                        } while (1);
        }

        /* Cleanup occurs in cleanup(), so no work to do here. */

Regards, Peter


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] xentop.c trivial fix, Peter <=