From 6237dc71448b8b8f0f1fbeaafc5a16867f60c8db Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Wed, 28 Jan 2015 11:59:12 +0100 Subject: [PATCH] doc: error code section cleanups Signed-off-by: Daniel Mack --- doc/kdbus.bus.xml | 15 +++++---- doc/kdbus.connection.xml | 47 +++++++++++++-------------- doc/kdbus.endpoint.xml | 21 ++++++------ doc/kdbus.match.xml | 17 +++++----- doc/kdbus.message.xml | 69 ++++++++++++++++++++-------------------- doc/kdbus.names.xml | 29 +++++++++-------- doc/kdbus.pool.xml | 11 ++++--- 7 files changed, 108 insertions(+), 101 deletions(-) diff --git a/doc/kdbus.bus.xml b/doc/kdbus.bus.xml index 92571f6..5698331 100644 --- a/doc/kdbus.bus.xml +++ b/doc/kdbus.bus.xml @@ -206,22 +206,23 @@ struct kdbus_cmd_make { Return value - On success, all mentioned ioctl commands return 0. + On success, all metioned ioctl commands return 0; on error, -1 is + returned, and errno is set to indicate the error. - <varname>KDBUS_CMD_BUS_MAKE</varname> may return the following errors + <varname>KDBUS_CMD_BUS_MAKE</varname> may fail with the following errors - -EBADMSG + EBADMSG A mandatory item is missing. - -EINVAL + EINVAL The flags supplied in the struct kdbus_cmd_make are invalid or the supplied name does not start with the current @@ -230,21 +231,21 @@ struct kdbus_cmd_make { - -EEXIST + EEXIST A bus of that name already exists. - -ESHUTDOWN + ESHUTDOWN The kdbus mount instance for the bus was already shut down. - -EMFILE + EMFILE The maximum number of buses for the current user is exhausted. diff --git a/doc/kdbus.connection.xml b/doc/kdbus.connection.xml index 4160c4d..7ba4163 100644 --- a/doc/kdbus.connection.xml +++ b/doc/kdbus.connection.xml @@ -811,22 +811,23 @@ struct kdbus_cmd_update { Return value - On success, all metioned ioctl commands return 0. + On success, all metioned ioctl commands return 0; on error, -1 is + returned, and errno is set to indicate the error. - <varname>KDBUS_CMD_HELLO</varname> may return the following errors + <varname>KDBUS_CMD_HELLO</varname> may fail with the following errors - -EFAULT + EFAULT The supplied pool size was 0 or not a multiple of the page size. - -EINVAL + EINVAL The flags supplied in struct kdbus_cmd_make are invalid. @@ -834,7 +835,7 @@ struct kdbus_cmd_update { - -EINVAL + EINVAL An illegal combination of KDBUS_HELLO_MONITOR, @@ -844,14 +845,14 @@ struct kdbus_cmd_update { - -EINVAL + EINVAL An invalid set of items was supplied. - -ECONNREFUSED + ECONNREFUSED The attach_flags_send field did not satisfy the requirements of the bus. @@ -859,7 +860,7 @@ struct kdbus_cmd_update { - -EPERM + EPERM A KDBUS_ITEM_CREDS items was supplied, but the current user is not privileged. @@ -867,21 +868,21 @@ struct kdbus_cmd_update { - -ESHUTDOWN + ESHUTDOWN The bus you were trying to connect to has already been shut down. - -EMFILE + EMFILE The maximum number of connections on the bus has been reached. - -EOPNOTSUPP + EOPNOTSUPP The endpoint does not support the connection flags supplied in struct kdbus_cmd_hello. @@ -891,18 +892,18 @@ struct kdbus_cmd_update { - <varname>KDBUS_CMD_BYEBYE</varname> may return the following errors + <varname>KDBUS_CMD_BYEBYE</varname> may fail with the following errors - -EALREADY + EALREADY The connection has already been shut down. - -EBUSY + EBUSY There are still messages queued up in the connection's pool. @@ -911,11 +912,11 @@ struct kdbus_cmd_update { - <varname>KDBUS_CMD_CONN_INFO</varname> may return the following errors + <varname>KDBUS_CMD_CONN_INFO</varname> may fail with the following errors - -EINVAL + EINVAL Invalid flags, or neither an ID nor a name was provided, or the name is invalid. @@ -923,14 +924,14 @@ struct kdbus_cmd_update { - -ESRCH + ESRCH Connection lookup by name failed. - -ENXIO + ENXIO No connection with the provided connection ID found. @@ -939,18 +940,18 @@ struct kdbus_cmd_update { - <varname>KDBUS_CMD_CONN_UPDATE</varname> may return the following errors + <varname>KDBUS_CMD_CONN_UPDATE</varname> may fail with the following errors - -EINVAL + EINVAL Illegal flags or items. - -EINVAL + EINVAL Wildcards submitted in policy entries, or illegal sequence of policy items. @@ -958,14 +959,14 @@ struct kdbus_cmd_update { - -EOPNOTSUPP + EOPNOTSUPP Operation not supported by connection. - -E2BIG + E2BIG Too many policy items attached. diff --git a/doc/kdbus.endpoint.xml b/doc/kdbus.endpoint.xml index 8ab7540..2afa016 100644 --- a/doc/kdbus.endpoint.xml +++ b/doc/kdbus.endpoint.xml @@ -256,15 +256,16 @@ struct kdbus_cmd_make { Return value - On success, all mentioned ioctl commands return 0. + On success, all metioned ioctl commands return 0; on error, -1 is + returned, and errno is set to indicate the error. - <varname>KDBUS_CMD_ENDPOINT_MAKE</varname> may return the following errors + <varname>KDBUS_CMD_ENDPOINT_MAKE</varname> may fail with the following errors - -EINVAL + EINVAL The flags supplied in the struct kdbus_cmd_make are invalid. @@ -272,7 +273,7 @@ struct kdbus_cmd_make { - -EINVAL + EINVAL Illegal combination of KDBUS_ITEM_NAME and KDBUS_ITEM_POLICY_ACCESS was provided. @@ -280,14 +281,14 @@ struct kdbus_cmd_make { - -EEXIST + EEXIST An endpoint of that name already exists. - -EPERM + EPERM The calling user is not privileged. See kdbus7 @@ -298,11 +299,11 @@ struct kdbus_cmd_make { - <varname>KDBUS_CMD_ENDPOINT_UPDATE</varname> may return the following errors + <varname>KDBUS_CMD_ENDPOINT_UPDATE</varname> may fail with the following errors - -EINVAL + EINVAL The flags supplied in the struct kdbus_cmd_update are invalid. @@ -310,7 +311,7 @@ struct kdbus_cmd_make { - -EINVAL + EINVAL Illegal combination of KDBUS_ITEM_NAME and KDBUS_ITEM_POLICY_ACCESS was provided. @@ -318,7 +319,7 @@ struct kdbus_cmd_make { - -EEXIST + EEXIST An endpoint of that name already exists. diff --git a/doc/kdbus.match.xml b/doc/kdbus.match.xml index e260fdd..ff8d15e 100644 --- a/doc/kdbus.match.xml +++ b/doc/kdbus.match.xml @@ -397,29 +397,30 @@ struct kdbus_cmd_match { Return value - On success, all mentioned ioctl commands return 0. + On success, all metioned ioctl commands return 0; on error, -1 is + returned, and errno is set to indicate the error. - <varname>KDBUS_CMD_MATCH_ADD</varname> may return the following errors + <varname>KDBUS_CMD_MATCH_ADD</varname> may fail with the following errors - -EINVAL + EINVAL Illegal flags or items. - -EDOM + EDOM Illegal bloom filter size. - -EMFILE + EMFILE Too many matches for this connection. @@ -428,18 +429,18 @@ struct kdbus_cmd_match { - <varname>KDBUS_CMD_MATCH_REMOVE</varname> may return the following errors + <varname>KDBUS_CMD_MATCH_REMOVE</varname> may fail with the following errors - -EINVAL + EINVAL Illegal flags. - -EBADSLT + EBADSLT A match entry with the given cookie could not be found. diff --git a/doc/kdbus.message.xml b/doc/kdbus.message.xml index 3482961..167cd59 100644 --- a/doc/kdbus.message.xml +++ b/doc/kdbus.message.xml @@ -753,15 +753,16 @@ struct kdbus_msg_info { Return value - On success, all metioned ioctl commands return 0. + On success, all metioned ioctl commands return 0; on error, -1 is + returned, and errno is set to indicate the error. - <varname>KDBUS_CMD_SEND</varname> may return the following errors + <varname>KDBUS_CMD_SEND</varname> may fail with the following errors - -EOPNOTSUPP + EOPNOTSUPP The connection is not an ordinary connection, or the passed file descriptors are either kdbus handles or unix domain @@ -770,7 +771,7 @@ struct kdbus_msg_info { - -EINVAL + EINVAL The submitted payload type is KDBUS_PAYLOAD_KERNEL, KDBUS_MSG_EXPECT_REPLY was set without timeout or @@ -783,7 +784,7 @@ struct kdbus_msg_info { - -ENOTUNIQ + ENOTUNIQ The supplied destination is KDBUS_DST_ID_BROADCAST, a file descriptor was passed, KDBUS_MSG_EXPECT_REPLY @@ -792,14 +793,14 @@ struct kdbus_msg_info { - -E2BIG + E2BIG Too many items - -EMSGSIZE + EMSGSIZE The size of the message header and items or the payload vector is excessive. @@ -807,7 +808,7 @@ struct kdbus_msg_info { - -EEXIST + EEXIST Multiple KDBUS_ITEM_FDS, KDBUS_ITEM_BLOOM_FILTER or @@ -816,7 +817,7 @@ struct kdbus_msg_info { - -EBADF + EBADF The supplied KDBUS_ITEM_FDS or KDBUS_ITEM_PAYLOAD_MEMFD items @@ -825,21 +826,21 @@ struct kdbus_msg_info { - -EMEDIUMTYPE + EMEDIUMTYPE The supplied memfd is not a sealed kdbus memfd. - -EMFILE + EMFILE Too many file descriptors inside a KDBUS_ITEM_FDS. - -EBADMSG + EBADMSG An item had illegal size, both a dst_id and a KDBUS_ITEM_DST_NAME was given, or both a name @@ -848,7 +849,7 @@ struct kdbus_msg_info { - -ETXTBSY + ETXTBSY The supplied kdbus memfd file cannot be sealed or the seal was removed, because it is shared with other processes or @@ -858,14 +859,14 @@ struct kdbus_msg_info { - -ECOMM + ECOMM A peer does not accept the file descriptors addressed to it. - -EFAULT + EFAULT The supplied bloom filter size was not 64-bit aligned or memory supplied by userspace could not be accessed by the kernel. @@ -873,7 +874,7 @@ struct kdbus_msg_info { - -EDOM + EDOM The supplied bloom filter size did not match the bloom filter size of the bus. @@ -881,7 +882,7 @@ struct kdbus_msg_info { - -EDESTADDRREQ + EDESTADDRREQ dst_id was set to KDBUS_DST_ID_NAME, but no @@ -890,14 +891,14 @@ struct kdbus_msg_info { - -ESRCH + ESRCH The name to look up was not found in the name registry. - -EADDRNOTAVAIL + EADDRNOTAVAIL KDBUS_MSG_NO_AUTO_START was given but the destination connection is an activator. @@ -905,7 +906,7 @@ struct kdbus_msg_info { - -ENXIO + ENXIO The passed numeric destination connection ID couldn't be found, or is not connected. @@ -913,28 +914,28 @@ struct kdbus_msg_info { - -ECONNRESET + ECONNRESET The destination connection is no longer active. - -ETIMEDOUT + ETIMEDOUT Timeout while synchronously waiting for a reply. - -EINTR + EINTR Interrupted system call while synchronously waiting for a reply. - -EPIPE + EPIPE When sending a message, a synchronous reply from the receiving connection was expected but the connection died before answering. @@ -942,14 +943,14 @@ struct kdbus_msg_info { - -ENOBUFS + ENOBUFS Too many pending messages on the receiver side. - -EREMCHG + EREMCHG Both a well-known name and a unique name (ID) was given, but the name is not currently owned by that connection. @@ -957,14 +958,14 @@ struct kdbus_msg_info { - -EXFULL + EXFULL The memory pool of the receiver is full. - -EREMOTEIO + EREMOTEIO While synchronously waiting for a reply, the remote peer failed with an I/O error. @@ -974,11 +975,11 @@ struct kdbus_msg_info { - <varname>KDBUS_CMD_RECV</varname> may return the following errors + <varname>KDBUS_CMD_RECV</varname> may fail with the following errors - -EOPNOTSUPP + EOPNOTSUPP The connection is not an ordinary connection, or the passed file descriptors are either kdbus handles or unix domain @@ -987,28 +988,28 @@ struct kdbus_msg_info { - -EINVAL + EINVAL Invalid flags or offset. - -EAGAIN + EAGAIN No message found in the queue - -ENOMSG + ENOMSG No message of the requested priority found. - -EOVERFLOW + EOVERFLOW Some messages have been lost. diff --git a/doc/kdbus.names.xml b/doc/kdbus.names.xml index 09f0c7a..64e32fe 100644 --- a/doc/kdbus.names.xml +++ b/doc/kdbus.names.xml @@ -476,15 +476,16 @@ struct kdbus_name_info { Return value - On success, all metioned ioctl commands return 0. + On success, all metioned ioctl commands return 0; on error, -1 is + returned, and errno is set to indicate the error. - <varname>KDBUS_CMD_NAME_ACQUIRE</varname> may return the following errors + <varname>KDBUS_CMD_NAME_ACQUIRE</varname> may fail with the following errors - -EINVAL + EINVAL Illegal command flags, illegal name provided, or an activator tried to acquire a second name. @@ -492,28 +493,28 @@ struct kdbus_name_info { - -EPERM + EPERM Policy prohibited name ownership. - -EALREADY + EALREADY Connection already owns that name. - -EEXIST + EEXIST The name already exists and can not be taken over. - -E2BIG + E2BIG The maximum number of well-known names per connection is exhausted. @@ -522,25 +523,25 @@ struct kdbus_name_info { - <varname>KDBUS_CMD_NAME_RELEASE</varname> may return the following errors + <varname>KDBUS_CMD_NAME_RELEASE</varname> may fail with the following errors - -EINVAL + EINVAL Invalid command flags, or invalid name provided. - -ESRCH + ESRCH Name is not found in the registry. - -EADDRINUSE + EADDRINUSE Name is owned by a different connection and can't be released. @@ -549,18 +550,18 @@ struct kdbus_name_info { - <varname>KDBUS_CMD_NAME_LIST</varname> may return the following errors + <varname>KDBUS_CMD_NAME_LIST</varname> may fail with the following errors - -EINVAL + EINVAL Invalid command flags - -ENOBUFS + ENOBUFS No available memory in the connection's pool. diff --git a/doc/kdbus.pool.xml b/doc/kdbus.pool.xml index 5d34dff..d5364f9 100644 --- a/doc/kdbus.pool.xml +++ b/doc/kdbus.pool.xml @@ -197,29 +197,30 @@ struct kdbus_cmd_free { Return value - On success, all metioned ioctl commands return 0. + On success, all metioned ioctl commands return 0; on error, -1 is + returned, and errno is set to indicate the error. - <varname>KDBUS_CMD_FREE</varname> may return the following errors + <varname>KDBUS_CMD_FREE</varname> may fail with the following errors - -ENXIO + ENXIO No pool slice found at given offset. - -EINVAL + EINVAL Invalid flags provided. - -EINVAL + EINVAL The offset is valid, but the user is not allowed to free the slice. This happens, for example, if the offset was retrieved with -- 2.34.1