ia64/xen-unstable

diff extras/mini-os/include/posix/dirent.h @ 17042:a905c582a406

Add stubdomain support. See stubdom/README for usage details.

- Move PAGE_SIZE and STACK_SIZE into __PAGE_SIZE and __STACK_SIZE in
arch_limits.h so as to permit getting them from there without
pulling all the internal Mini-OS defines.
- Setup a xen-elf cross-compilation environment in stubdom/cross-root
- Add a POSIX layer on top of Mini-OS by linking against the newlib C
library and lwIP, and implementing the Unixish part in mini-os/lib/sys.c
- Cross-compile zlib and libpci too.
- Add an xs.h-compatible layer on top of Mini-OS' xenbus.
- Cross-compile libxc with an additional xc_minios.c and a few things
disabled.
- Cross-compile ioemu with an additional block-vbd, but without sound,
tpm and other details. A few hacks are needed:
- Align ide and scsi buffers at least on sector size to permit
direct transmission to the block backend. While we are at it, just
page-align it to possibly save a segment. Also, limit the scsi
buffer size because of limitations of the block paravirtualization
protocol.
- Allocate big tables dynamically rather that letting them go to
bss: when Mini-OS gets installed in memory, bss is not lazily
allocated, and doing so during Mini-OS is unnecessarily trick while
we can simply use malloc.
- Had to change the Mini-OS compilation somehow, so as to export
Mini-OS compilation flags to the Makefiles of libxc and ioemu.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Feb 12 14:35:39 2008 +0000 (2008-02-12)
parents
children 9818c7099e20
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/extras/mini-os/include/posix/dirent.h	Tue Feb 12 14:35:39 2008 +0000
     1.3 @@ -0,0 +1,24 @@
     1.4 +#ifndef _POSIX_DIRENT_H
     1.5 +#define _POSIX_DIRENT_H
     1.6 +
     1.7 +#include <sys/types.h>
     1.8 +
     1.9 +struct dirent {
    1.10 +        char *d_name;
    1.11 +};
    1.12 +
    1.13 +typedef struct {
    1.14 +        struct dirent dirent;
    1.15 +        char *name;
    1.16 +        int32_t offset;
    1.17 +        char **entries;
    1.18 +        int32_t curentry;
    1.19 +        int32_t nbentries;
    1.20 +        int has_more;
    1.21 +} DIR;
    1.22 +
    1.23 +DIR *opendir(const char *name);
    1.24 +struct dirent *readdir(DIR *dir);
    1.25 +int closedir(DIR *dir);
    1.26 +
    1.27 +#endif /* _POSIX_DIRENT_H */