linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH obexd 5/8] core: Use ENOSYS to indicate not implemented function
Date: Sat, 18 Feb 2012 17:19:00 +0200	[thread overview]
Message-ID: <1329578343-31663-5-git-send-email-luiz.dentz@gmail.com> (raw)
In-Reply-To: <1329578343-31663-1-git-send-email-luiz.dentz@gmail.com>

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

---
 src/obex.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/obex.c b/src/obex.c
index 2b10103..786398d 100644
--- a/src/obex.c
+++ b/src/obex.c
@@ -767,7 +767,7 @@ static void cmd_get(GObex *obex, GObexPacket *req, gpointer user_data)
 	}
 
 	if (os->service->get == NULL) {
-		os_set_response(os, -EINVAL);
+		os_set_response(os, -ENOSYS);
 		return;
 	}
 
@@ -782,7 +782,7 @@ static void cmd_get(GObex *obex, GObexPacket *req, gpointer user_data)
 
 	if (!os->driver) {
 		error("No driver found");
-		os_set_response(os, -EINVAL);
+		os_set_response(os, -ENOSYS);
 		return;
 	}
 
@@ -814,7 +814,7 @@ static void cmd_setpath(GObex *obex, GObexPacket *req, gpointer user_data)
 	}
 
 	if (os->service->setpath == NULL) {
-		err = -EINVAL;
+		err = -ENOSYS;
 		goto done;
 	}
 
@@ -955,7 +955,7 @@ static void cmd_put(GObex *obex, GObexPacket *req, gpointer user_data)
 
 	if (os->driver == NULL) {
 		error("No driver found");
-		os_set_response(os, -EINVAL);
+		os_set_response(os, -ENOSYS);
 		return;
 	}
 
@@ -971,7 +971,7 @@ static void cmd_put(GObex *obex, GObexPacket *req, gpointer user_data)
 	}
 
 	if (os->service->put == NULL) {
-		os_set_response(os, -EINVAL);
+		os_set_response(os, -ENOSYS);
 		return;
 	}
 
@@ -1036,7 +1036,7 @@ static void cmd_action(GObex *obex, GObexPacket *req, gpointer user_data)
 	}
 
 	if (os->service->action == NULL) {
-		err = -EINVAL;
+		err = -ENOSYS;
 		goto done;
 	}
 
@@ -1052,7 +1052,7 @@ static void cmd_action(GObex *obex, GObexPacket *req, gpointer user_data)
 						os->service->who,
 						os->service->who_size);
 	if (os->driver == NULL) {
-		err = -EINVAL;
+		err = -ENOSYS;
 		goto done;
 	}
 
@@ -1168,7 +1168,7 @@ const char *obex_get_type(struct obex_session *os)
 int obex_remove(struct obex_session *os, const char *path)
 {
 	if (os->driver == NULL)
-		return -EINVAL;
+		return -ENOSYS;
 
 	return os->driver->remove(path);
 }
@@ -1177,7 +1177,7 @@ int obex_copy(struct obex_session *os, const char *source,
 						const char *destination)
 {
 	if (os->driver == NULL || os->driver->copy == NULL)
-		return -EINVAL;
+		return -ENOSYS;
 
 	DBG("%s %s", source, destination);
 
@@ -1188,7 +1188,7 @@ int obex_move(struct obex_session *os, const char *source,
 						const char *destination)
 {
 	if (os->driver == NULL || os->driver->move == NULL)
-		return -EINVAL;
+		return -ENOSYS;
 
 	DBG("%s %s", source, destination);
 
-- 
1.7.7.6


  parent reply	other threads:[~2012-02-18 15:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-18 15:18 [PATCH obexd 1/8] core: Fix queueing packet containing error while suspended Luiz Augusto von Dentz
2012-02-18 15:18 ` [PATCH obexd 2/8] gobex: Translate posix error code to proper OBEX response opcode Luiz Augusto von Dentz
2012-02-18 15:18 ` [PATCH obexd 3/8] core: Make use of g_obex_errno_to_rsp to translate posix errors Luiz Augusto von Dentz
2012-02-18 15:18 ` [PATCH obexd 4/8] gobex: Use ENOSYS to correspond to OBEX not implemented Luiz Augusto von Dentz
2012-02-18 15:19 ` Luiz Augusto von Dentz [this message]
2012-02-18 15:19 ` [PATCH obexd 6/8] ftp: Use ENOSYS to indicate not implemented function Luiz Augusto von Dentz
2012-02-18 15:19 ` [PATCH obexd 7/8] core: " Luiz Augusto von Dentz
2012-02-18 15:19 ` [PATCH obexd 8/8] map: " Luiz Augusto von Dentz
2012-02-19 22:19 ` [PATCH obexd 1/8] core: Fix queueing packet containing error while suspended Johan Hedberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1329578343-31663-5-git-send-email-luiz.dentz@gmail.com \
    --to=luiz.dentz@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).