diff mbox series

[v5,2/6] dbus: add PermissionDenied DBus error

Message ID 20240828192428.902761-2-prestwoj@gmail.com (mailing list archive)
State Accepted, archived
Headers show
Series [v5,1/6] doc: Document station Affinities property | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
prestwoj/iwd-ci-gitlint success GitLint

Commit Message

James Prestwood Aug. 28, 2024, 7:24 p.m. UTC
---
 src/dbus.c | 6 ++++++
 src/dbus.h | 1 +
 2 files changed, 7 insertions(+)
diff mbox series

Patch

diff --git a/src/dbus.c b/src/dbus.c
index 32de1e1a..b3799b55 100644
--- a/src/dbus.c
+++ b/src/dbus.c
@@ -134,6 +134,12 @@  struct l_dbus_message *dbus_error_not_hidden(struct l_dbus_message *msg)
 					"Not hidden");
 }
 
+struct l_dbus_message *dbus_error_permission_denied(struct l_dbus_message *msg)
+{
+	return l_dbus_message_new_error(msg, IWD_SERVICE ".PermissionDenied",
+					"Permission Denied");
+}
+
 struct l_dbus_message *dbus_error_from_errno(int err,
 						struct l_dbus_message *msg)
 {
diff --git a/src/dbus.h b/src/dbus.h
index 14814b5d..6d7074bf 100644
--- a/src/dbus.h
+++ b/src/dbus.h
@@ -82,6 +82,7 @@  struct l_dbus_message *dbus_error_service_set_overlap(
 struct l_dbus_message *dbus_error_already_provisioned(
 						struct l_dbus_message *msg);
 struct l_dbus_message *dbus_error_not_hidden(struct l_dbus_message *msg);
+struct l_dbus_message *dbus_error_permission_denied(struct l_dbus_message *msg);
 
 struct l_dbus_message *dbus_error_from_errno(int err,
 						struct l_dbus_message *msg);