integrate xen-ocaml-tools.hg with xen-unstable.hg - extra minios libc functions
PATCH 3/5 integrate xen-ocaml-tools.hg with xen-unstable.hg - extra minios libc functions
These functions are needed to link the ocaml version of xenstored.
We could stub them out as unsupported, but we may as well implement them as they are very simple.
Signed-off-by Alex Zeffertt <[email protected]>
extras/mini-os/include/posix/unistd.h +6 -0
@@ -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 */
extras/mini-os/lib/sys.c +32 -0
@@ -1183,6 +1183,32 @@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 ;
@@ -1251,6 +1277,12 @@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-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel