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] minios: Implement some extra lib function

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] minios: Implement some extra lib functions for ocaml xenstored stubdom
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 19 May 2009 09:30:47 -0700
Delivery-date: Tue, 19 May 2009 09:32:27 -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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1242738943 -3600
# Node ID b4de3a393f21a5ae29ac3283d6aa5e5c981551c8
# Parent  49f2f2aa5f833cce33442ddc970ce8d0898807e0
minios: Implement some extra lib functions for ocaml xenstored stubdom

We could stub them out as unsupported, but we may as well implement
them as they are very simple.

Signed-off-by: Alex Zeffertt <alex.zeffertt@xxxxxxxxxxxxx>
---
 extras/mini-os/include/posix/unistd.h |    6 ++++++
 extras/mini-os/lib/sys.c              |   32 ++++++++++++++++++++++++++++++++
 2 files changed, 38 insertions(+)

diff -r 49f2f2aa5f83 -r b4de3a393f21 extras/mini-os/include/posix/unistd.h
--- a/extras/mini-os/include/posix/unistd.h     Tue May 19 14:14:41 2009 +0100
+++ b/extras/mini-os/include/posix/unistd.h     Tue May 19 14:15:43 2009 +0100
@@ -3,8 +3,14 @@
 
 #include_next <unistd.h>
 
+uid_t getuid(void);
+uid_t geteuid(void);
+gid_t getgid(void);
+gid_t getegid(void);
+int gethostname(char *name, size_t namelen);
 size_t getpagesize(void);
 int ftruncate(int fd, off_t length);
 int lockf(int fd, int cmd, off_t len);
+int nice(int inc);
 
 #endif /* _POSIX_UNISTD_H */
diff -r 49f2f2aa5f83 -r b4de3a393f21 extras/mini-os/lib/sys.c
--- a/extras/mini-os/lib/sys.c  Tue May 19 14:14:41 2009 +0100
+++ b/extras/mini-os/lib/sys.c  Tue May 19 14:15:43 2009 +0100
@@ -1185,6 +1185,32 @@ int clock_gettime(clockid_t clk_id, stru
     return 0;
 }
 
+uid_t getuid(void)
+{
+       return 0;
+}
+
+uid_t geteuid(void)
+{
+       return 0;
+}
+
+gid_t getgid(void)
+{
+       return 0;
+}
+
+gid_t getegid(void)
+{
+       return 0;
+}
+
+int gethostname(char *name, size_t namelen)
+{
+       strncpy(name, "mini-os", namelen);
+       return 0;
+}
+
 size_t getpagesize(void)
 {
     return PAGE_SIZE;
@@ -1253,6 +1279,12 @@ void sparse(unsigned long data, size_t s
     munmap((void *) data, size);
     free_physical_pages(mfns, n);
     do_map_zero(data, n);
+}
+
+int nice(int inc)
+{
+    printk("nice() stub called with inc=%d\n", inc);
+    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] minios: Implement some extra lib functions for ocaml xenstored stubdom, Xen patchbot-unstable <=