summaryrefslogtreecommitdiff
path: root/src/lib/dev.c
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@intec.ugent.be>2016-06-22 16:56:03 +0200
committerdimitri staessens <dimitri.staessens@intec.ugent.be>2016-06-22 16:56:03 +0200
commit4b5eaafdc9b61307a6a4074366372df3c170372e (patch)
treefbb6c556e833e5af3cead917c8ac547853f0382f /src/lib/dev.c
parente24581b93fb3329a1c89b294da15e3375513cf89 (diff)
parentcf5d13dfd66afd68dd7fe93d009a4539c236b095 (diff)
downloadouroboros-4b5eaafdc9b61307a6a4074366372df3c170372e.tar.gz
ouroboros-4b5eaafdc9b61307a6a4074366372df3c170372e.zip
Merged in sandervrijders/ouroboros/be (pull request #137)
Be
Diffstat (limited to 'src/lib/dev.c')
-rw-r--r--src/lib/dev.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/dev.c b/src/lib/dev.c
index d0f29ade..ad311f7f 100644
--- a/src/lib/dev.c
+++ b/src/lib/dev.c
@@ -92,7 +92,7 @@ int ap_init(char * ap_name)
instance_name_destroy(_ap_instance->api);
bmp_destroy(_ap_instance->fds);
free(_ap_instance);
- return -ENOSHM;
+ return -1;
}
_ap_instance->rb = shm_ap_rbuff_create();
@@ -101,7 +101,7 @@ int ap_init(char * ap_name)
shm_du_map_close(_ap_instance->dum);
bmp_destroy(_ap_instance->fds);
free(_ap_instance);
- return -ENOSHM;
+ return -1;
}
for (i = 0; i < AP_MAX_FLOWS; ++i) {
@@ -175,7 +175,7 @@ int flow_accept(char ** ae_name)
recv_msg = send_recv_irm_msg(&msg);
if (recv_msg == NULL) {
- return -EIRM;
+ return -1;
}
if (!recv_msg->has_pid || !recv_msg->has_port_id) {
@@ -200,7 +200,7 @@ int flow_accept(char ** ae_name)
pthread_rwlock_unlock(&_ap_instance->flows_lock);
pthread_rwlock_unlock(&_ap_instance->data_lock);
irm_msg__free_unpacked(recv_msg, NULL);
- return -ENOSHM;
+ return -1;
}
if (ae_name != NULL) {
@@ -260,7 +260,7 @@ int flow_alloc_resp(int fd,
recv_msg = send_recv_irm_msg(&msg);
if (recv_msg == NULL) {
pthread_rwlock_unlock(&_ap_instance->data_lock);
- return -EIRM;
+ return -1;
}
if (!recv_msg->has_result) {
@@ -305,7 +305,7 @@ int flow_alloc(char * dst_name,
recv_msg = send_recv_irm_msg(&msg);
if (recv_msg == NULL) {
- return -EIRM;
+ return -1;
}
if (!recv_msg->has_pid || !recv_msg->has_port_id) {
@@ -330,7 +330,7 @@ int flow_alloc(char * dst_name,
pthread_rwlock_unlock(&_ap_instance->flows_lock);
pthread_rwlock_unlock(&_ap_instance->data_lock);
irm_msg__free_unpacked(recv_msg, NULL);
- return -ENOSHM;
+ return -1;
}
_ap_instance->flows[fd].port_id = recv_msg->port_id;
@@ -372,7 +372,7 @@ int flow_alloc_res(int fd)
recv_msg = send_recv_irm_msg(&msg);
if (recv_msg == NULL) {
- return -EIRM;
+ return -1;
}
if (!recv_msg->has_result) {
@@ -418,7 +418,7 @@ int flow_dealloc(int fd)
recv_msg = send_recv_irm_msg(&msg);
if (recv_msg == NULL) {
pthread_rwlock_unlock(&_ap_instance->data_lock);
- return -EIRM;
+ return -1;
}
if (!recv_msg->has_result) {
@@ -511,7 +511,7 @@ ssize_t flow_write(int fd, void * buf, size_t count)
shm_release_du_buff(_ap_instance->dum, index);
pthread_rwlock_unlock(&_ap_instance->flows_lock);
pthread_rwlock_unlock(&_ap_instance->data_lock);
- return -ENOSHM;
+ return -1;
}
} else { /* blocking */
while ((index = shm_create_du_buff(_ap_instance->dum,