aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-04-17 01:33:58 +0200
committerMattias Andrée <maandree@operamail.com>2015-04-17 01:33:58 +0200
commit3461652528f1d8fec5d1a9707469bb23c904c15e (patch)
treea7e925174a2db81f71ae5827a9cc17270fa700ee /doc
parentadd man3 (diff)
downloadbus-3461652528f1d8fec5d1a9707469bb23c904c15e.tar.gz
bus-3461652528f1d8fec5d1a9707469bb23c904c15e.tar.bz2
bus-3461652528f1d8fec5d1a9707469bb23c904c15e.tar.xz
man3: errors
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--doc/bus_close.34
-rw-r--r--doc/bus_create.37
-rw-r--r--doc/bus_open.313
-rw-r--r--doc/bus_read.32
-rw-r--r--doc/bus_unlink.313
-rw-r--r--doc/bus_write.32
6 files changed, 41 insertions, 0 deletions
diff --git a/doc/bus_close.3 b/doc/bus_close.3
index f971b53..94e23a8 100644
--- a/doc/bus_close.3
+++ b/doc/bus_close.3
@@ -9,6 +9,10 @@ int bus_close(bus_t *bus);
The \fIbus_close\fP function shall dispose of resource require for the process to use a bus whose information is stored in \fIbus\fP.
.SH RETURN VALUES
Upon successful completion, the function shall return 0. Otherwise the function shall return -1 and set \fIerrno\fP to indicate the error.
+.SH ERRORS
+.TP
+.IR EINVAL
+The bus does not exist.
.SH SEE ALSO
bus-create(1), bus(5), libbus(7), bus_open(3), bus_unlink(3)
.SH AUTHORS
diff --git a/doc/bus_create.3 b/doc/bus_create.3
index cfb7963..68d52cc 100644
--- a/doc/bus_create.3
+++ b/doc/bus_create.3
@@ -15,6 +15,13 @@ If and only if \fIflags\fP contains \fIBUS_INTR\fP, the function shall fail if i
Unless \fIout_file\fP is \fINULL\P, the pathname of the bus should be stored in a new char array stored in \fI*out_file\fP. The caller must free the allocated stored in \fI*out_file\fP.
.SH RETURN VALUES
Upon successful completion, the function shall return 0. Otherwise the function shall return -1 and set \fIerrno\fP to indicate the error.
+.SH ERRORS
+.TP
+.IR ENOMEM
+The process cannot allocate more memory.
+.SH
+
+The \fIbus_create\fP() function may also fail and set \fIerrno\fP to any of the errors specified for the rutines open(2) and write(2).
.SH SEE ALSO
bus-create(1), bus(5), libbus(7), bus_unlink(3), bus_open(3)
.SH AUTHORS
diff --git a/doc/bus_open.3 b/doc/bus_open.3
index cdd51cf..d193d15 100644
--- a/doc/bus_open.3
+++ b/doc/bus_open.3
@@ -20,6 +20,19 @@ The process will only be using the bus for sending messages.
The process will use the bus for both receiving adn sending messages.
.SH RETURN VALUES
Upon successful completion, the function shall return 0. Otherwise the function shall return -1 and set \fIerrno\fP to indicate the error.
+.SH ERRORS
+.TP
+.IR ENOMEM
+The process cannot allocate more memory.
+.TP
+.IR EACCES
+Operation permission is denied to the calling process.
+.TP
+.IR EINVAL
+The described bus does not exist.
+.SH
+
+The \fIbus_open\fP() function may also fail and set \fIerrno\fP to any of the errors specified for the rutine open(2).
.SH SEE ALSO
bus-create(1), bus(5), libbus(7), bus_open(3), bus_unlink(3)
.SH AUTHORS
diff --git a/doc/bus_read.3 b/doc/bus_read.3
index 1751cb8..8c8982c 100644
--- a/doc/bus_read.3
+++ b/doc/bus_read.3
@@ -11,6 +11,8 @@ The \fIbus_read\fP function shall continuously wait for new message to be sent o
After \fIcallback\fP returns, \fImessage\fP may be override. Therefore \fIcallback\fP should copy \fImessage\fP and start a new thread that uses the copy of \fImessage\fP. \fIcallback\fP shall return -1 on failure, 0 if \fIbus_read\fP should stop listening or 1 if \fIbus_read\fP should stop listening.
.SH RETURN VALUES
Upon successful completion, the function shall return 0. Otherwise the function shall return -1 and set \fIerrno\fP to indicate the error.
+.SH ERRORS
+The \fIbus_read\fP() function may fail and set \fIerrno\fP to any of the errors specified for the rutine semop(3).
.SH SEE ALSO
bus-create(1), bus(5), libbus(7), bus_open(3), bus_write(3)
.SH AUTHORS
diff --git a/doc/bus_unlink.3 b/doc/bus_unlink.3
index f1bc947..ef7cf30 100644
--- a/doc/bus_unlink.3
+++ b/doc/bus_unlink.3
@@ -9,6 +9,19 @@ int bus_unlink(const char *file);
The \fIbus_unlink\fP function shall remove the bus assoicated with the pathname stored in \fIfile\fP. The \fIbus_unlink\fP function shall also unlink the file.
.SH RETURN VALUES
Upon successful completion, the function shall return 0. Otherwise the function shall return -1 and set \fIerrno\fP to indicate the error.
+.SH ERRORS
+.TP
+.IR EINVAL
+The bus does not exist.
+.TP
+.IR EACCES
+Operation permission is denied to the calling process.
+.TP
+.IR EPERM
+The user does not have permission to remove the bus.
+.SH
+
+The \fIbus_unlink\fP() function may also fail and set \fIerrno\fP to any of the errors specified for the rutines unlink(2), open(2), semget(3) and shmget(3).
.SH SEE ALSO
bus-create(1), bus(5), libbus(7), bus_create(3), bus_close(3)
.SH AUTHORS
diff --git a/doc/bus_write.3 b/doc/bus_write.3
index cc5c8f2..643b3fe 100644
--- a/doc/bus_write.3
+++ b/doc/bus_write.3
@@ -9,6 +9,8 @@ int bus_write(const bus_t *bus, const char *message);
The \fIbus_write\fP function shall broadcast a message on the bus whose information is stored in \fIbus\fP. The message read by the function is stored in the parameter \fImessage\fIP. It may not exceeed 2048 bytes including NUL-termiantion.
.SH RETURN VALUES
Upon successful completion, the function shall return 0. Otherwise the function shall return -1 and set \fIerrno\fP to indicate the error.
+.SH ERRORS
+The \fIbus_read\fP() function may fail and set \fIerrno\fP to any of the errors specified for the rutine semop(3).
.SH SEE ALSO
bus-create(1), bus(5), libbus(7), bus_open(3), bus_raed(3)
.SH AUTHORS