summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--serial/error.c8
-rw-r--r--serial/error.h2
2 files changed, 10 insertions, 0 deletions
diff --git a/serial/error.c b/serial/error.c
index 22be2b1e..ba894992 100644
--- a/serial/error.c
+++ b/serial/error.c
@@ -64,6 +64,14 @@ DBusHandlerResult err_connection_not_in_progress(DBusConnection *conn,
"Connection creation not in progress"));
}
+DBusHandlerResult err_already_exists(DBusConnection *conn,
+ DBusMessage *msg, const char *str)
+{
+ return send_message_and_unref(conn,
+ dbus_message_new_error(msg,
+ SERIAL_ERROR_INTERFACE ".AlreadyExists", str));
+}
+
DBusHandlerResult err_does_not_exist(DBusConnection *conn,
DBusMessage *msg, const char *str)
{
diff --git a/serial/error.h b/serial/error.h
index 14301e95..f12602fb 100644
--- a/serial/error.h
+++ b/serial/error.h
@@ -31,6 +31,8 @@ DBusHandlerResult err_connection_in_progress(DBusConnection *conn,
DBusMessage *msg);
DBusHandlerResult err_connection_not_in_progress(DBusConnection *conn,
DBusMessage *msg);
+DBusHandlerResult err_already_exists(DBusConnection *conn,
+ DBusMessage *msg, const char *str);
DBusHandlerResult err_does_not_exist(DBusConnection *conn,
DBusMessage *msg, const char *str);
DBusHandlerResult err_failed(DBusConnection *conn,