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-changelog

[Xen-changelog] [xen-unstable] xenpm: clean up print messages

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xenpm: clean up print messages
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Sun, 10 Jul 2011 08:44:11 +0100
Delivery-date: Sun, 10 Jul 2011 00:44:57 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Kevin Tian <kevin.tian@xxxxxxxxx>
# Date 1310110381 -3600
# Node ID b8a2443097803feff48a7a79f147cde5cb316d81
# Parent  2faba14bac13d967981f7602f40815f060754c4a
xenpm: clean up print messages

Signed-off-by Kevin Tian <kevin.tian@xxxxxxxxx>
---


diff -r 2faba14bac13 -r b8a244309780 tools/misc/xenpm.c
--- a/tools/misc/xenpm.c        Fri Jul 08 08:32:37 2011 +0100
+++ b/tools/misc/xenpm.c        Fri Jul 08 08:33:01 2011 +0100
@@ -115,6 +115,9 @@
     if ( !cxstat )
         return -EINVAL;
 
+    if ( !max_cx_num )
+        return -ENODEV;
+
     cxstat->triggers = malloc(max_cx_num * sizeof(uint64_t));
     if ( !cxstat->triggers )
         return -ENOMEM;
@@ -147,7 +150,7 @@
     if ( (ret = xc_get_cpuidle_max_cstate(xc_handle, &value)) )
         return ret;
 
-    printf("Max C-state: C%d\n\n", value);
+    printf("Max possible C-state: C%d\n\n", value);
     return 0;
 }
 
@@ -158,7 +161,11 @@
 
     ret = get_cxstat_by_cpuid(xc_handle, cpuid, &cxstatinfo);
     if ( ret )
+    {
+        if ( ret == -ENODEV )
+            printf("Either xen cpuidle is disabled or no valid information is 
registered!\n");
         return ret;
+    }
 
     print_cxstat(cpuid, &cxstatinfo);
 
@@ -1191,7 +1198,7 @@
 
     if ( nr_matches > 1 )
     {
-        fprintf(stderr, "Ambigious options: ");
+        fprintf(stderr, "Ambiguous options: ");
         for ( i = 0; i < nr_matches; i++ )
             fprintf(stderr, " %s", main_options[matches_main_options[i]].name);
         fprintf(stderr, "\n");

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xenpm: clean up print messages, Xen patchbot-unstable <=