]> xenbits.xensource.com Git - rumpuser-xen.git/commitdiff
more header cleanup, remove dupes from <mini-os/lib.h>
authorAntti Kantee <pooka@iki.fi>
Tue, 3 Sep 2013 08:40:20 +0000 (11:40 +0300)
committerAntti Kantee <pooka@iki.fi>
Tue, 3 Sep 2013 08:40:20 +0000 (11:40 +0300)
22 files changed:
arch/x86/mm.c
arch/x86/setup.c
arch/x86/traps.c
blkfront.c
console/console.c
console/xenbus.c
console/xencons_ring.c
gntmap.c
gnttab.c
include/mini-os/lib.h
include/mini-os/xmalloc.h
kernel.c
lib/memalloc.c
lib/printf.c
lib/string.c
mm.c
netfront.c
rumphyper_base.c
rumphyper_net.c
rumphyper_synch.c
rumpkern_demo.c
xenbus/xenbus.c

index 76742b4757138ddc3608db01da2111dfa743f568..5258145697e65a4b2e0729005e64a948319dc7b0 100644 (file)
 #include <mini-os/mm.h>
 #include <mini-os/types.h>
 #include <mini-os/lib.h>
-#include <mini-os/xmalloc.h>
 #include <xen/memory.h>
 
+#include <string.h>
+
 #ifdef MM_DEBUG
 #define DEBUG(_f, _a...) \
     printk("MINI_OS(file=mm.c, line=%d) " _f "\n", __LINE__, ## _a)
index 923901e595f0526bf858bcdbb581b0422f6e481f..238243c6eb7fbe4794347814bee0842f123f9b28 100644 (file)
@@ -27,7 +27,8 @@
  */
 
 #include <mini-os/os.h>
-#include <mini-os/lib.h> /* for printk, memcpy */
+
+#include <string.h>
 
 /*
  * Shared page for communicating with the hypervisor.
index 516d133ec8cef13a564ef7e5647151f9eec4ec97..f2ee81eeb2570389b48291a3f1987c2661e98af7 100644 (file)
@@ -6,6 +6,8 @@
 #include <mini-os/lib.h>
 #include <mini-os/sched.h>
 
+#include <string.h>
+
 /*
  * These are assembler stubs in entry.S.
  * They are the actual entry points for virtual exceptions.
index a7eaaaf76bf6db7defd33576cdb81f0860dc7853..159bb1f0b61ede6b95f0fadb624cd0f4eaf4994c 100644 (file)
 #include <mini-os/lib.h>
 #include <fcntl.h>
 
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+
 /* Note: we generally don't need to disable IRQs since we hardly do anything in
  * the interrupt handler.  */
 
index 7c85c6f0004f54ec84053a1a53a3bf5498d5055c..3756220b440aed258aa007cb170bfb49d0060608 100644 (file)
@@ -44,6 +44,9 @@
 #include <mini-os/xenbus.h>
 #include <xen/io/console.h>
 
+#include <stdio.h>
+#include <string.h>
+
 
 /* Copies all print output to the Xen emergency console apart
    of standard dom0 handled console */
index bf03ed0407caf833318aa67baf3f89428a71e90e..b3b7f3e97a25e77b0f95ce9472e28b32ee245667 100644 (file)
 #include <xen/io/ring.h>
 #include <mini-os/xmalloc.h>
 #include <mini-os/gnttab.h>
-#include "console.h"
+
+#include <console/console.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 
 void free_consfront(struct consfront_dev *dev)
 {
index 0a35fbfbbe910084bd38b3fb572b537a6a8dc146..5eae4291542163d6a6a4cd85c2054d140706ea07 100644 (file)
 #include <xen/io/ring.h>
 #include <mini-os/xmalloc.h>
 #include <mini-os/gnttab.h>
-#include "console.h"
+
+#include <console/console.h>
+
+#include <stdlib.h>
+#include <string.h>
 
 DECLARE_WAIT_QUEUE_HEAD(console_queue);
 
index 22ed450c8c02079696dfa7b2fcf3e73d5b1b0fb9..e050ca3122485c1e964db40c9127a0528275c609 100644 (file)
--- a/gntmap.c
+++ b/gntmap.c
@@ -38,6 +38,8 @@
 #include <inttypes.h>
 #include <mini-os/gntmap.h>
 
+#include <string.h>
+
 #define DEFAULT_MAX_GRANTS 128
 
 struct gntmap_entry {
index ebfa8ac5541ad3560737d2682a5bfbab3a2d5e62..32a57943b6ce914cefcd0bc7eae3af960d29afd4 100644 (file)
--- a/gnttab.c
+++ b/gnttab.c
@@ -20,6 +20,8 @@
 #include <mini-os/gnttab.h>
 #include <mini-os/semaphore.h>
 
+#include <string.h>
+
 #define NR_RESERVED_ENTRIES 8
 
 /* NR_GRANT_FRAMES must be less than or equal to that configured in Xen */
index ab474903d1ca7a014906cbfc785971d51e81acb5..2f7bcfd38591d278561566ca25223de59264d8a7 100644 (file)
 #ifndef _LIB_H_
 #define _LIB_H_
 
-#include <stdarg.h>
-#include <stddef.h>
 #include <xen/xen.h>
 #include <xen/event_channel.h>
-#include <sys/queue.h>
 #include "gntmap.h"
 
-
-int            sprintf(char *, const char *, ...);
-int            snprintf(char *, size_t, const char *, ...);
-void           vprintf(const char *, va_list);
-int            vsprintf(char *, const char *, va_list);
-int            vsnprintf(char *, size_t, const char *, va_list);
-unsigned long  strtoul(const char *, char **, int);
-
-/* string and memory manipulation */
-
-/*
- * From:
- *     @(#)libkern.h   8.1 (Berkeley) 6/10/93
- * $FreeBSD$
- */
-int     memcmp(const void *b1, const void *b2, size_t len);
-
-char   *strcat(char * __restrict, const char * __restrict);
-int     strcmp(const char *, const char *);
-char   *strcpy(char * __restrict, const char * __restrict);
-
-char   *strdup(const char *__restrict);
-
-size_t  strlen(const char *);
-
-int     strncmp(const char *, const char *, size_t);
-char   *strncpy(char * __restrict, const char * __restrict, size_t);
-
-char   *strstr(const char *, const char *);
-
-void *memset(void *, int, size_t);
-
-char *strchr(const char *p, int ch);
-char *strrchr(const char *p, int ch);
-
-/* From:
- *     @(#)systm.h     8.7 (Berkeley) 3/29/95
- * $FreeBSD$
- */
-void   *memcpy(void *to, const void *from, size_t len);
-
-size_t strnlen(const char *, size_t);
-
 #include <mini-os/console.h>
 
 #define RAND_MIX 2654435769U
index 3a7f49d9f4dc2a48be8c45131ae43ff8e2a03b57..f041c9e265294b05cc308a38969bf8792fc01959 100644 (file)
@@ -14,7 +14,6 @@ void *        calloc(size_t, size_t);
 #define DEFAULT_ALIGN (sizeof(unsigned long))
 
 /* compat */
-#define malloc(size) memalloc(size, DEFAULT_ALIGN)
 #define _xmalloc(size, align) memalloc(size, align)
 #define xfree(ptr) free(ptr)
 
index ca1f3a3218b3fb4bbad95e119fb44304747cd1ed..1c4c7e05a08e274767da7619abd9db8aff0d483a 100644 (file)
--- a/kernel.c
+++ b/kernel.c
@@ -46,6 +46,8 @@
 #include <xen/features.h>
 #include <xen/version.h>
 
+#include <string.h>
+
 uint8_t xen_features[XENFEAT_NR_SUBMAPS * 32];
 
 void setup_xen_features(void)
index 29057686790f95280db16b780a2210f16a432b63..f3173e822d04fcdb35b83af4d10f294fee49bac5 100644 (file)
@@ -66,6 +66,8 @@
 #include <mini-os/os.h>
 #include <mini-os/mm.h>
 
+#include <string.h>
+
 #endif
 
 
index f3618c34cbab313d723c3d7e82dc1d9335e1fe7b..609d4a6a3787911848ba199d305d7f24c31b0ff0 100644 (file)
@@ -44,6 +44,9 @@
 #include <mini-os/os.h>
 #include <mini-os/lib.h>
 
+#include <stdio.h>
+#include <string.h>
+
 /*
  * local prototypes
  */
index 11683070309ba7e57b12fb9b07c5790063e6b592..0c4125dfb2729d0727befe3d2f5c0c0f895ff8cc 100644 (file)
@@ -21,9 +21,8 @@
 #include <sys/types.h>
 #include <sys/null.h>
 
-#include <mini-os/xmalloc.h>
-
 #include <string.h>
+#include <stdlib.h>
 
 char *strdup(const char *x)
 {
diff --git a/mm.c b/mm.c
index bde4c3f119e90a82e6a8490af418d61f0f471694..2a4d720948e02af9cda32f5060646ea1702a1e83 100644 (file)
--- a/mm.c
+++ b/mm.c
@@ -42,6 +42,8 @@
 #include <mini-os/lib.h>
 #include <mini-os/xmalloc.h>
 
+#include <string.h>
+
 #ifdef MM_DEBUG
 #define DEBUG(_f, _a...) \
     printk("MINI_OS(file=mm.c, line=%d) " _f "\n", __LINE__, ## _a)
index 29e6621c54c7d7fbf0334e27efd1715a4d949999..389bb725134bfad88925ba9a2383b094d6993c35 100644 (file)
 #include <mini-os/lib.h>
 #include <mini-os/semaphore.h>
 
-DECLARE_WAIT_QUEUE_HEAD(netfront_queue);
-
-
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 
+DECLARE_WAIT_QUEUE_HEAD(netfront_queue);
 
 #define NET_TX_RING_SIZE __CONST_RING_SIZE(netif_tx, PAGE_SIZE)
 #define NET_RX_RING_SIZE __CONST_RING_SIZE(netif_rx, PAGE_SIZE)
 #define GRANT_INVALID_REF 0
 
-
 struct net_buffer {
     void* page;
     grant_ref_t gref;
index 2f66ba046fd54f9b97629f3d5d8bfca053999089..a3813c52a85e560e882e32a8f1ba8b31a118bdff 100644 (file)
@@ -31,6 +31,9 @@
 #include <mini-os/blkfront.h>
 #include <mini-os/fcntl.h>
 
+#include <stdio.h>
+#include <string.h>
+
 #include "rumphyper.h"
 
 struct rumpuser_hyperup rumpuser__hyp;
index b030a434fe5f35b13b4550a9253f6bb2b963e496..c874c35946dd53fc7e03fb615a2ad444b1bb5cd0 100644 (file)
@@ -25,7 +25,9 @@
 
 #include <mini-os/os.h>
 #include <mini-os/netfront.h>
-#include <mini-os/xmalloc.h>
+
+#include <stdlib.h>
+#include <string.h>
 
 #include "rumphyper.h"
 #include <rump/rumpuser.h>
index 74c199265f862b49c6d3cecd29e2662dbfcce834..ed84a5e4ba974ca16a256075861ac73804a13828 100644 (file)
 #include <mini-os/types.h>
 #include <mini-os/console.h>
 #include <mini-os/sched.h>
-#include <mini-os/xmalloc.h>
 
 #include <sys/queue.h>
 
+#include <stdlib.h>
+#include <string.h>
+
 #include "rumphyper.h"
 
 #define assert(a) ASSERT(a)
index 9bcf3514f6b0033107b957709a0a2f2aa4a32973..34f143b5a6926a2f98c59390add8395ccf058b4a 100644 (file)
@@ -1,16 +1,16 @@
 #include <mini-os/console.h>
 #include <mini-os/netfront.h>
-#include <mini-os/xmalloc.h>
 #include <mini-os/errno.h>
 
 #include <sys/types.h>
 
-#include <dirent.h>
-
 #include <netinet/in.h>
 
 #include <ufs/ufs/ufsmount.h>
 
+#include <dirent.h>
+#include <stdlib.h>
+#include <string.h>
 #include <poll.h>
 
 #include <rump/rump.h>
index cfde9c8eec2293ad4a26c5092bb1791e05ff72af..54719aaa008ea706a0db41e65ccba170d38fc5dd 100644 (file)
 #include <mini-os/spinlock.h>
 #include <mini-os/xmalloc.h>
 
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
 #define min(x,y) ({                       \
         typeof(x) tmpx = (x);                 \
         typeof(y) tmpy = (y);                 \