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] A few small fixes for xenstored:

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] A few small fixes for xenstored:
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 22 Oct 2007 14:50:19 -0700
Delivery-date: Mon, 22 Oct 2007 14:50:59 -0700
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 Keir Fraser <keir@xxxxxxxxxxxxx>
# Date 1193059359 -3600
# Node ID 368f563f2fd0909ba28a41a7c80d5ebdb9b9bda5
# Parent  dc2ff26bbdf6254b339589bf23fd5dae7fe128b7
A few small fixes for xenstored:
 - Proper sizeof parameter to snprintf
 - Return proper xs_domain_dev for netbsd.
Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx>
---
 tools/xenstore/xs_lib.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff -r dc2ff26bbdf6 -r 368f563f2fd0 tools/xenstore/xs_lib.c
--- a/tools/xenstore/xs_lib.c   Mon Oct 22 14:21:13 2007 +0100
+++ b/tools/xenstore/xs_lib.c   Mon Oct 22 14:22:39 2007 +0100
@@ -44,7 +44,7 @@ static const char *xs_daemon_path(void)
        char *s = getenv("XENSTORED_PATH");
        if (s)
                return s;
-       if (snprintf(buf, PATH_MAX, "%s/socket",
+       if (snprintf(buf, sizeof(buf), "%s/socket",
                     xs_daemon_rundir()) >= PATH_MAX)
                return NULL;
        return buf;
@@ -68,7 +68,7 @@ const char *xs_daemon_socket_ro(void)
        const char *s = xs_daemon_path();
        if (s == NULL)
                return NULL;
-       if (snprintf(buf, PATH_MAX, "%s_ro", s) >= PATH_MAX)
+       if (snprintf(buf, sizeof(buf), "%s_ro", s) >= PATH_MAX)
                return NULL;
        return buf;
 }
@@ -79,8 +79,10 @@ const char *xs_domain_dev(void)
        if (s)
                return s;
 
-#ifdef __linux__
+#if defined(__linux__)
        return "/proc/xen/xenbus";
+#elif defined(__NetBSD__)
+       return "/kern/xen/xenbus";
 #else
        return "/dev/xen/xenbus";
 #endif

_______________________________________________
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] A few small fixes for xenstored:, Xen patchbot-unstable <=