[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] minios: Implement some extra lib functions for ocaml xenstored stubdom
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |