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] [XENSTORE] Fix xenstore-ls program to con

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XENSTORE] Fix xenstore-ls program to connect via kernel xenbus
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 09 Nov 2006 18:40:16 +0000
Delivery-date: Thu, 09 Nov 2006 10:40:29 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID 9b65a87f140f570286c0ccdbaae54e21dca4bdd2
# Parent  0b8f79563bcd400821636ae7a980900718a8042e
[XENSTORE] Fix xenstore-ls program to connect via kernel xenbus
connection by default, like all other client utils.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 tools/xenstore/xsls.c |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diff -r 0b8f79563bcd -r 9b65a87f140f tools/xenstore/xsls.c
--- a/tools/xenstore/xsls.c     Thu Nov 09 13:18:58 2006 +0000
+++ b/tools/xenstore/xsls.c     Thu Nov 09 13:25:47 2006 +0000
@@ -94,14 +94,8 @@ int main(int argc, char *argv[])
 int main(int argc, char *argv[])
 {
     struct winsize ws;
-    int ret;
-    int c;
-    int show_perm = 0;
-
-    struct xs_handle *xsh = xs_daemon_open();
-
-    if (xsh == NULL)
-        err(1, "xs_daemon_open");
+    int ret, c, socket = 0, show_perm = 0;
+    struct xs_handle *xsh;
 
 #define PAD 2
 
@@ -110,11 +104,14 @@ int main(int argc, char *argv[])
     if (!ret)
         max_width = ws.ws_col - PAD;
 
-    while (0 < (c = getopt(argc, argv, "p"))) {
+    while (0 < (c = getopt(argc, argv, "ps"))) {
         switch (c) {
         case 'p':
             show_perm = 1;
             max_width -= 16;
+            break;
+        case 's':
+            socket = 1;
             break;
         case ':':
         case '?':
@@ -124,6 +121,10 @@ int main(int argc, char *argv[])
         }
     }
 
+    xsh = socket ? xs_daemon_open() : xs_domain_open();
+    if (xsh == NULL)
+        err(1, socket ? "xs_daemon_open" : "xs_domain_open");
+
     print_dir(xsh, (argc - optind) == 1 ? argv[optind] : "/", 0, show_perm);
 
     return 0;

_______________________________________________
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] [XENSTORE] Fix xenstore-ls program to connect via kernel xenbus, Xen patchbot-unstable <=