session-monitor/trivial: rename local functions for unique prefix

Don't use a "sd_" prefix for our local functions because
then it's not immediately clear which functions are ours
and which are from systemd-logind. Just rename them to have
a "st_sd_*" prefix ("st" like "session tracking").
This commit is contained in:
Thomas Haller 2016-03-11 11:11:58 +01:00
parent aed3c810b3
commit 500bbbf761

View file

@ -80,7 +80,7 @@ static guint signals[LAST_SIGNAL] = { 0 };
#ifdef SESSION_TRACKING_SYSTEMD #ifdef SESSION_TRACKING_SYSTEMD
static gboolean static gboolean
sd_session_exists (NMSessionMonitor *monitor, uid_t uid, gboolean active) st_sd_session_exists (NMSessionMonitor *monitor, uid_t uid, gboolean active)
{ {
int status; int status;
@ -97,7 +97,7 @@ sd_session_exists (NMSessionMonitor *monitor, uid_t uid, gboolean active)
} }
static gboolean static gboolean
sd_changed (GIOChannel *stream, GIOCondition condition, gpointer user_data) st_sd_changed (GIOChannel *stream, GIOCondition condition, gpointer user_data)
{ {
NMSessionMonitor *monitor = user_data; NMSessionMonitor *monitor = user_data;
@ -109,7 +109,7 @@ sd_changed (GIOChannel *stream, GIOCondition condition, gpointer user_data)
} }
static void static void
sd_init (NMSessionMonitor *monitor) st_sd_init (NMSessionMonitor *monitor)
{ {
int status; int status;
GIOChannel *stream; GIOChannel *stream;
@ -123,13 +123,13 @@ sd_init (NMSessionMonitor *monitor)
} }
stream = g_io_channel_unix_new (sd_login_monitor_get_fd (monitor->sd.monitor)); stream = g_io_channel_unix_new (sd_login_monitor_get_fd (monitor->sd.monitor));
monitor->sd.watch = g_io_add_watch (stream, G_IO_IN, sd_changed, monitor); monitor->sd.watch = g_io_add_watch (stream, G_IO_IN, st_sd_changed, monitor);
g_io_channel_unref (stream); g_io_channel_unref (stream);
} }
static void static void
sd_finalize (NMSessionMonitor *monitor) st_sd_finalize (NMSessionMonitor *monitor)
{ {
g_clear_pointer (&monitor->sd.monitor, sd_login_monitor_unref); g_clear_pointer (&monitor->sd.monitor, sd_login_monitor_unref);
g_source_remove (monitor->sd.watch); g_source_remove (monitor->sd.watch);
@ -383,7 +383,7 @@ nm_session_monitor_session_exists (NMSessionMonitor *self,
g_return_val_if_fail (NM_IS_SESSION_MONITOR (self), FALSE); g_return_val_if_fail (NM_IS_SESSION_MONITOR (self), FALSE);
#ifdef SESSION_TRACKING_SYSTEMD #ifdef SESSION_TRACKING_SYSTEMD
if (sd_session_exists (self, uid, active)) if (st_sd_session_exists (self, uid, active))
return TRUE; return TRUE;
#endif #endif
@ -401,7 +401,7 @@ static void
nm_session_monitor_init (NMSessionMonitor *monitor) nm_session_monitor_init (NMSessionMonitor *monitor)
{ {
#ifdef SESSION_TRACKING_SYSTEMD #ifdef SESSION_TRACKING_SYSTEMD
sd_init (monitor); st_sd_init (monitor);
#endif #endif
#ifdef SESSION_TRACKING_CONSOLEKIT #ifdef SESSION_TRACKING_CONSOLEKIT
@ -413,7 +413,7 @@ static void
nm_session_monitor_finalize (GObject *object) nm_session_monitor_finalize (GObject *object)
{ {
#ifdef SESSION_TRACKING_SYSTEMD #ifdef SESSION_TRACKING_SYSTEMD
sd_finalize (NM_SESSION_MONITOR (object)); st_sd_finalize (NM_SESSION_MONITOR (object));
#endif #endif
#ifdef SESSION_TRACKING_CONSOLEKIT #ifdef SESSION_TRACKING_CONSOLEKIT