summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2015-04-23 10:41:34 -0400
committerRay Strode <rstrode@redhat.com>2015-04-23 13:51:11 -0400
commit8937c32cd5fe5318cfe946a8be6dcdcae26378f3 (patch)
tree1baced6d2cc5d52ea0c63e81e706aa3b6c604347
parenta8a5da768a1fa5b9baa3af6e604859531952b513 (diff)
xwayland: rename lockfile to lock_file
The missing underscore is inconsistent with the coding style of the surrounding code. https://bugzilla.gnome.org/show_bug.cgi?id=748380
-rw-r--r--src/wayland/meta-wayland-private.h2
-rw-r--r--src/wayland/meta-xwayland.c22
2 files changed, 12 insertions, 12 deletions
diff --git a/src/wayland/meta-wayland-private.h b/src/wayland/meta-wayland-private.h
index 245d4963..edcc60a8 100644
--- a/src/wayland/meta-wayland-private.h
+++ b/src/wayland/meta-wayland-private.h
@@ -43,7 +43,7 @@ typedef struct
typedef struct
{
int display_index;
- char *lockfile;
+ char *lock_file;
int abstract_fd;
int unix_fd;
pid_t pid;
diff --git a/src/wayland/meta-xwayland.c b/src/wayland/meta-xwayland.c
index bd762998..ad6667ea 100644
--- a/src/wayland/meta-xwayland.c
+++ b/src/wayland/meta-xwayland.c
@@ -182,7 +182,7 @@ try_display (int display,
if (kill (other, 0) < 0 && errno == ESRCH)
{
- /* Process is dead. Try unlinking the lockfile and trying again. */
+ /* Process is dead. Try unlinking the lock file and trying again. */
if (unlink (filename) < 0)
{
g_warning ("failed to unlink stale lock file %s: %m", filename);
@@ -221,7 +221,7 @@ try_display (int display,
}
static char *
-create_lockfile (int display, int *display_out)
+create_lock_file (int display, int *display_out)
{
char *filename;
int fd;
@@ -354,7 +354,7 @@ static gboolean
choose_xdisplay (MetaXWaylandManager *manager)
{
int display = 0;
- char *lockfile = NULL;
+ char *lock_file = NULL;
/* Hack to keep the unused Xwayland instance on
* the login screen from taking the prime :0 display
@@ -365,8 +365,8 @@ choose_xdisplay (MetaXWaylandManager *manager)
do
{
- lockfile = create_lockfile (display, &display);
- if (!lockfile)
+ lock_file = create_lock_file (display, &display);
+ if (!lock_file)
{
g_warning ("Failed to create an X lock file");
return FALSE;
@@ -375,7 +375,7 @@ choose_xdisplay (MetaXWaylandManager *manager)
manager->abstract_fd = bind_to_abstract_socket (display);
if (manager->abstract_fd < 0)
{
- unlink (lockfile);
+ unlink (lock_file);
if (errno == EADDRINUSE)
{
@@ -389,7 +389,7 @@ choose_xdisplay (MetaXWaylandManager *manager)
manager->unix_fd = bind_to_unix_socket (display);
if (manager->abstract_fd < 0)
{
- unlink (lockfile);
+ unlink (lock_file);
close (manager->abstract_fd);
return FALSE;
}
@@ -400,7 +400,7 @@ choose_xdisplay (MetaXWaylandManager *manager)
manager->display_index = display;
manager->display_name = g_strdup_printf (":%d", manager->display_index);
- manager->lockfile = lockfile;
+ manager->lock_file = lock_file;
return TRUE;
}
@@ -506,8 +506,8 @@ meta_xwayland_start (MetaXWaylandManager *manager,
out:
if (!started)
{
- unlink (manager->lockfile);
- g_clear_pointer (&manager->lockfile, g_free);
+ unlink (manager->lock_file);
+ g_clear_pointer (&manager->lock_file, g_free);
}
return started;
}
@@ -532,5 +532,5 @@ meta_xwayland_stop (MetaXWaylandManager *manager)
snprintf (path, sizeof path, "/tmp/.X11-unix/X%d", manager->display_index);
unlink (path);
- unlink (manager->lockfile);
+ unlink (manager->lock_file);
}