Added a shared memory test.

- libposix error printing now configurable via macro definition
- shmget/at/dt tested.
This commit is contained in:
Bahadir Balban
2009-05-12 18:16:25 +03:00
parent 324481a334
commit 33fcceb2b6
24 changed files with 126 additions and 76 deletions

View File

@@ -18,6 +18,7 @@
#include <fcntl.h>
#include <l4/macros.h>
#include INC_GLUE(memory.h)
#include <libposix.h>
static inline int l4_mkdir(const char *pathname, mode_t mode)
{
@@ -30,12 +31,12 @@ static inline int l4_mkdir(const char *pathname, mode_t mode)
/* Call pager with shmget() request. Check ipc error. */
if ((fd = l4_sendrecv(VFS_TID, VFS_TID, L4_IPC_TAG_MKDIR)) < 0) {
printf("%s: L4 IPC Error: %d.\n", __FUNCTION__, fd);
print_err("%s: L4 IPC Error: %d.\n", __FUNCTION__, fd);
return fd;
}
/* Check if syscall itself was successful */
if ((fd = l4_get_retval()) < 0) {
printf("%s: MKDIR Error: %d.\n", __FUNCTION__, fd);
print_err("%s: MKDIR Error: %d.\n", __FUNCTION__, fd);
return fd;
}
return fd;