All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Zeffertt <alex.zeffertt@eu.citrix.com>
To: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: [PATCH 3/5] integrate xen-ocaml-tools.hg with xen-unstable.hg - extra minios libc functions
Date: Fri, 24 Apr 2009 13:03:12 +0100	[thread overview]
Message-ID: <49F1AA80.9090601@eu.citrix.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: minios-extra-supported-libc-functions --]
[-- Type: text/plain, Size: 1524 bytes --]

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 <alex.zeffertt@eu.citrix.com>

diff -r b100eb7a088b extras/mini-os/include/posix/unistd.h
--- a/extras/mini-os/include/posix/unistd.h	Mon Apr 06 16:18:20 2009 +0100
+++ b/extras/mini-os/include/posix/unistd.h	Tue Apr 07 15:36:22 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 b100eb7a088b extras/mini-os/lib/sys.c
--- a/extras/mini-os/lib/sys.c	Mon Apr 06 16:18:20 2009 +0100
+++ b/extras/mini-os/lib/sys.c	Tue Apr 07 15:36:22 2009 +0100
@@ -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;
 }
 
 


[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

                 reply	other threads:[~2009-04-24 12:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49F1AA80.9090601@eu.citrix.com \
    --to=alex.zeffertt@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.