diff options
author | Scott Anderson <ascent12@hotmail.com> | 2017-08-26 11:56:43 +1200 |
---|---|---|
committer | Scott Anderson <ascent12@hotmail.com> | 2017-08-26 11:56:43 +1200 |
commit | 46823152ea5e2d0f888fa25ba6b4b1896e4e89b9 (patch) | |
tree | c2ca508b1938841dfbdc444fa283991d257426bf /backend/session | |
parent | f10da8291b3f0d51b55262bd623511c8b8349a9e (diff) |
Rename functions to be consistent with #93
Diffstat (limited to 'backend/session')
-rw-r--r-- | backend/session/direct-ipc.c | 2 | ||||
-rw-r--r-- | backend/session/direct.c | 10 | ||||
-rw-r--r-- | backend/session/logind.c | 8 | ||||
-rw-r--r-- | backend/session/session.c | 8 |
4 files changed, 14 insertions, 14 deletions
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) { |