aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorScott Anderson <ascent12@hotmail.com>2017-08-26 11:56:43 +1200
committerScott Anderson <ascent12@hotmail.com>2017-08-26 11:56:43 +1200
commit46823152ea5e2d0f888fa25ba6b4b1896e4e89b9 (patch)
treec2ca508b1938841dfbdc444fa283991d257426bf /backend
parentf10da8291b3f0d51b55262bd623511c8b8349a9e (diff)
Rename functions to be consistent with #93
Diffstat (limited to 'backend')
-rw-r--r--backend/backend.c4
-rw-r--r--backend/multi/backend.c2
-rw-r--r--backend/session/direct-ipc.c2
-rw-r--r--backend/session/direct.c10
-rw-r--r--backend/session/logind.c8
-rw-r--r--backend/session/session.c8
6 files changed, 17 insertions, 17 deletions
diff --git a/backend/backend.c b/backend/backend.c
index 790a14b3..9a3fd036 100644
--- a/backend/backend.c
+++ b/backend/backend.c
@@ -85,7 +85,7 @@ struct wlr_backend *wlr_backend_autocreate(struct wl_display *display) {
// Attempt DRM+libinput
- struct wlr_session *session = wlr_session_start(display);
+ struct wlr_session *session = wlr_session_create(display);
if (!session) {
wlr_log(L_ERROR, "Failed to start a DRM session");
return NULL;
@@ -131,6 +131,6 @@ error_gpu:
error_udev:
wlr_udev_destroy(udev);
error_session:
- wlr_session_finish(session);
+ wlr_session_destroy(session);
return NULL;
}
diff --git a/backend/multi/backend.c b/backend/multi/backend.c
index 33b26a0a..9bb596e5 100644
--- a/backend/multi/backend.c
+++ b/backend/multi/backend.c
@@ -36,7 +36,7 @@ static void multi_backend_destroy(struct wlr_backend *_backend) {
free(sub);
}
list_free(backend->backends);
- wlr_session_finish(backend->session);
+ wlr_session_destroy(backend->session);
wlr_udev_destroy(backend->udev);
free(backend);
}
diff --git a/backend/session/direct-ipc.c b/backend/session/direct-ipc.c
index 71e22148..5f1494a6 100644
--- a/backend/session/direct-ipc.c
+++ b/backend/session/direct-ipc.c
@@ -212,7 +212,7 @@ void direct_ipc_finish(int sock, pid_t pid) {
waitpid(pid, NULL, 0);
}
-int direct_ipc_start(pid_t *pid_out) {
+int direct_ipc_init(pid_t *pid_out) {
if (!have_permissions()) {
return -1;
}
diff --git a/backend/session/direct.c b/backend/session/direct.c
index 82aa8e00..0a08bfd6 100644
--- a/backend/session/direct.c
+++ b/backend/session/direct.c
@@ -79,7 +79,7 @@ static bool direct_change_vt(struct wlr_session *base, unsigned vt) {
return ioctl(session->tty_fd, VT_ACTIVATE, (int)vt) == 0;
}
-static void direct_session_finish(struct wlr_session *base) {
+static void direct_session_destroy(struct wlr_session *base) {
struct direct_session *session = wl_container_of(base, session, base);
struct vt_mode mode = {
.mode = VT_AUTO,
@@ -196,14 +196,14 @@ error:
return false;
}
-static struct wlr_session *direct_session_start(struct wl_display *disp) {
+static struct wlr_session *direct_session_create(struct wl_display *disp) {
struct direct_session *session = calloc(1, sizeof(*session));
if (!session) {
wlr_log_errno(L_ERROR, "Allocation failed");
return NULL;
}
- session->sock = direct_ipc_start(&session->child);
+ session->sock = direct_ipc_init(&session->child);
if (session->sock == -1) {
goto error_session;
}
@@ -236,8 +236,8 @@ error_session:
}
const struct session_impl session_direct = {
- .start = direct_session_start,
- .finish = direct_session_finish,
+ .create = direct_session_create,
+ .destroy = direct_session_destroy,
.open = direct_session_open,
.close = direct_session_close,
.change_vt = direct_change_vt,
diff --git a/backend/session/logind.c b/backend/session/logind.c
index 20d9b5ed..6b93ff67 100644
--- a/backend/session/logind.c
+++ b/backend/session/logind.c
@@ -204,7 +204,7 @@ static void release_control(struct logind_session *session) {
sd_bus_message_unref(msg);
}
-static void logind_session_finish(struct wlr_session *base) {
+static void logind_session_destroy(struct wlr_session *base) {
struct logind_session *session = wl_container_of(base, session, base);
release_control(session);
@@ -316,7 +316,7 @@ static int dbus_event(int fd, uint32_t mask, void *data) {
return 1;
}
-static struct wlr_session *logind_session_start(struct wl_display *disp) {
+static struct wlr_session *logind_session_create(struct wl_display *disp) {
int ret;
struct logind_session *session = calloc(1, sizeof(*session));
if (!session) {
@@ -390,8 +390,8 @@ error:
}
const struct session_impl session_logind = {
- .start = logind_session_start,
- .finish = logind_session_finish,
+ .create = logind_session_create,
+ .destroy = logind_session_destroy,
.open = logind_take_device,
.close = logind_release_device,
.change_vt = logind_change_vt,
diff --git a/backend/session/session.c b/backend/session/session.c
index a07d3cda..24a1f538 100644
--- a/backend/session/session.c
+++ b/backend/session/session.c
@@ -15,11 +15,11 @@ static const struct session_impl *impls[] = {
NULL,
};
-struct wlr_session *wlr_session_start(struct wl_display *disp) {
+struct wlr_session *wlr_session_create(struct wl_display *disp) {
const struct session_impl **iter;
for (iter = impls; *iter; ++iter) {
- struct wlr_session *session = (*iter)->start(disp);
+ struct wlr_session *session = (*iter)->create(disp);
if (session) {
return session;
}
@@ -29,12 +29,12 @@ struct wlr_session *wlr_session_start(struct wl_display *disp) {
return NULL;
}
-void wlr_session_finish(struct wlr_session *session) {
+void wlr_session_destroy(struct wlr_session *session) {
if (!session) {
return;
}
- session->impl->finish(session);
+ session->impl->destroy(session);
};
int wlr_session_open_file(struct wlr_session *session, const char *path) {