return EOPNOTSUPP instead of in-kernel-only ENOTSUPP
authorKay Sievers <kay@vrfy.org>
Thu, 24 Apr 2014 08:32:26 +0000 (10:32 +0200)
committerKay Sievers <kay@vrfy.org>
Thu, 24 Apr 2014 08:35:33 +0000 (10:35 +0200)
endpoint.c
handle.c
kdbus.h

index f37b80a834275170f06423dbd1be8f0ef54a3c52..7267a566f1117f9c4179b1956410f3424c85e5a2 100644 (file)
@@ -279,7 +279,7 @@ int kdbus_ep_policy_set(struct kdbus_ep *ep,
                        size_t items_size)
 {
        if (!ep->policy_db)
-               return -ENOTSUPP;
+               return -EOPNOTSUPP;
 
        if (items_size == 0)
                return 0;
index eda88c1f5552b5b7665020f547139c7fc9506b7e..979df576402e8ddfbd9a144c0b3edc9a3e78fa5e 100644 (file)
--- a/handle.c
+++ b/handle.c
@@ -328,7 +328,7 @@ static long kdbus_handle_ioctl_control(struct file *file, unsigned int cmd,
                        break;
 
                if (!kdbus_check_flags(make->flags)) {
-                       ret = -ENOTSUPP;
+                       ret = -EOPNOTSUPP;
                        break;
                }
 
@@ -370,7 +370,7 @@ static long kdbus_handle_ioctl_control(struct file *file, unsigned int cmd,
                        break;
 
                if (!kdbus_check_flags(make->flags)) {
-                       ret = -ENOTSUPP;
+                       ret = -EOPNOTSUPP;
                        break;
                }
 
@@ -435,7 +435,7 @@ static long kdbus_handle_ioctl_ep(struct file *file, unsigned int cmd,
                        break;
 
                if (!kdbus_check_flags(make->flags)) {
-                       ret = -ENOTSUPP;
+                       ret = -EOPNOTSUPP;
                        break;
                }
 
@@ -490,7 +490,7 @@ static long kdbus_handle_ioctl_ep(struct file *file, unsigned int cmd,
                hello = p;
 
                if (!kdbus_check_flags(hello->conn_flags)) {
-                       ret = -ENOTSUPP;
+                       ret = -EOPNOTSUPP;
                        break;
                }
 
diff --git a/kdbus.h b/kdbus.h
index b8861ceb017659557c47cd198a792f967684ff46..e9f7d44bcb1a3a2236dc5f85000abf3a9fa34a26 100644 (file)
--- a/kdbus.h
+++ b/kdbus.h
@@ -924,14 +924,14 @@ enum kdbus_ioctl_type {
  * @ENOMSG:            The queue is not empty, but no message with a matching
  *                     priority is currently queued.
  * @ENOSYS:            The requested functionality is not available.
- * @ENOTSUPP:          The feature negotiation failed, a not supported feature
- *                     was requested, or an unknown item type was received.
  * @ENOTTY:            An unknown ioctl command was received.
  * @ENOTUNIQ:          A specific data type was addressed to a broadcast
  *                     address, but only direct addresses support this kind of
  *                     data.
  * @ENXIO:             A unique address does not exist, or an offset in the
  *                     receiver's pool does not represent a queued message.
+ * @EOPNOTSUPP:                The feature negotiation failed, a not supported feature
+ *                     was requested, or an unknown item type was received.
  * @EPERM:             The policy prevented an operation. The requested
  *                     resource is owned by another entity.
  * @EPIPE:             When sending a message, a synchronous reply from the