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] mini-os: Make utility function get_self_i

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] mini-os: Make utility function get_self_id() in fs-front.c public.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 16 Dec 2008 22:31:23 -0800
Delivery-date: Tue, 16 Dec 2008 22:33:29 -0800
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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1229428825 0
# Node ID 86db039882eaa71d824ba5fd68abd83da82a77e9
# Parent  ea0ad7b3ae41737ec857e227935cc27129281b1a
mini-os: Make utility function get_self_id() in fs-front.c public.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@xxxxxxxxxxxxx>
---
 extras/mini-os/fs-front.c       |   14 +-------------
 extras/mini-os/include/xenbus.h |    3 +++
 extras/mini-os/xenbus/xenbus.c  |   11 +++++++++++
 3 files changed, 15 insertions(+), 13 deletions(-)

diff -r ea0ad7b3ae41 -r 86db039882ea extras/mini-os/fs-front.c
--- a/extras/mini-os/fs-front.c Tue Dec 16 11:59:22 2008 +0000
+++ b/extras/mini-os/fs-front.c Tue Dec 16 12:00:25 2008 +0000
@@ -867,18 +867,6 @@ moretodo:
     if(more) goto moretodo;
     
     in_irq = 0;
-}
-
-/* Small utility function to figure out our domain id */
-static domid_t get_self_id(void)
-{
-    char *dom_id;
-    domid_t ret; 
-
-    BUG_ON(xenbus_read(XBT_NIL, "domid", &dom_id));
-    sscanf(dom_id, "%d", &ret);
-
-    return ret;
 }
 
 static void alloc_request_table(struct fs_import *import)
@@ -1066,7 +1054,7 @@ static int init_fs_import(struct fs_impo
     unmask_evtchn(import->local_port);
 
     
-    self_id = get_self_id(); 
+    self_id = xenbus_get_self_id(); 
     /* Write the frontend info to a node in our Xenbus */
     sprintf(nodename, "/local/domain/%d/device/vfs/%d", 
                         self_id, import->import_id);
diff -r ea0ad7b3ae41 -r 86db039882ea extras/mini-os/include/xenbus.h
--- a/extras/mini-os/include/xenbus.h   Tue Dec 16 11:59:22 2008 +0000
+++ b/extras/mini-os/include/xenbus.h   Tue Dec 16 12:00:25 2008 +0000
@@ -91,6 +91,9 @@ char* xenbus_printf(xenbus_transaction_t
                                   const char* fmt, ...)
                    __attribute__((__format__(printf, 4, 5)));
 
+/* Utility function to figure out our domain id */
+domid_t xenbus_get_self_id(void);
+
 /* Reset the XenBus system. */
 void fini_xenbus(void);
 
diff -r ea0ad7b3ae41 -r 86db039882ea extras/mini-os/xenbus/xenbus.c
--- a/extras/mini-os/xenbus/xenbus.c    Tue Dec 16 11:59:22 2008 +0000
+++ b/extras/mini-os/xenbus/xenbus.c    Tue Dec 16 12:00:25 2008 +0000
@@ -666,6 +666,17 @@ char* xenbus_printf(xenbus_transaction_t
     return xenbus_write(xbt,fullpath,val);
 }
 
+domid_t xenbus_get_self_id(void)
+{
+    char *dom_id;
+    domid_t ret;
+
+    BUG_ON(xenbus_read(XBT_NIL, "domid", &dom_id));
+    sscanf(dom_id, "%d", &ret);
+
+    return ret;
+}
+
 static void do_ls_test(const char *pre)
 {
     char **dirs, *msg;

_______________________________________________
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] mini-os: Make utility function get_self_id() in fs-front.c public., Xen patchbot-unstable <=