#include "udisksdaemon.h"
#include "udisksdaemonutil.h"
#include "udiskscleanup.h"
+#include "udiskslogging.h"
/**
* SECTION:udisksdaemonutil
if (str[n + 1] != 'x' || str[n + 2] == '\0' || str[n + 3] == '\0')
{
- g_warning ("**** NOTE: malformed encoded string `%s'", str);
+ udisks_warning ("**** NOTE: malformed encoded string `%s'", str);
break;
}
if (!g_utf8_validate (s->str, -1, &end_valid))
{
- g_warning ("The string `%s' is not valid UTF-8. Invalid characters begins at `%s'", s->str, end_valid);
+ udisks_warning ("The string `%s' is not valid UTF-8. Invalid characters begins at `%s'", s->str, end_valid);
ret = g_strndup (s->str, end_valid - s->str);
g_string_free (s, TRUE);
}
NULL, /* gsize *out_length */
&error))
{
- g_warning ("Error reading %s: %s (%s %d)",
- filesystems_file,
- error->message,
- g_quark_to_string (error->domain),
- error->code);
+ udisks_warning ("Error reading %s: %s (%s %d)",
+ filesystems_file,
+ error->message,
+ g_quark_to_string (error->domain),
+ error->code);
g_error_free (error);
goto out;
}
pw = getpwuid (uid);
if (pw == NULL)
{
- g_warning ("Couldn't look up uid %d: %m", uid);
+ udisks_warning ("Error looking up uid %d: %m", uid);
goto out;
}
gid = pw->pw_gid;
pw = getpwuid (uid);
if (pw == NULL)
{
- g_warning ("Couldn't look up uid %d: %m", uid);
+ udisks_warning ("Error looking up uid %d: %m", uid);
goto out;
}
if (pw->pw_gid == gid)
if (getgrouplist (pw->pw_name, pw->pw_gid, supplementary_groups, &num_supplementary_groups) < 0)
{
- g_warning ("Couldn't find supplementary groups for uid %d: %m", uid);
+ udisks_warning ("Error getting supplementary groups for uid %d: %m", uid);
goto out;
}
#include <glib.h>
#include <glib-object.h>
+#include "udiskslogging.h"
#include "udisksmountmonitor.h"
#include "udisksmount.h"
#include "udisksprivate.h"
encoded_root,
encoded_mount_point) != 6)
{
- g_warning ("%s: Error parsing line '%s'", G_STRFUNC, lines[n]);
+ udisks_warning ("Error parsing line '%s'", lines[n]);
continue;
}
if (sscanf (sep + 3, "%s %s", fstype, mount_source) != 2)
{
- g_warning ("%s: Error parsing things past - for '%s'", G_STRFUNC, lines[n]);
+ udisks_warning ("Error parsing things past - for '%s'", lines[n]);
continue;
}
if (stat (mount_source, &statbuf) != 0)
{
- g_warning ("%s: Error statting %s: %m", G_STRFUNC, mount_source);
+ udisks_warning ("Error statting %s: %m", mount_source);
continue;
}
if (!S_ISBLK (statbuf.st_mode))
{
- g_warning ("%s: %s is not a block device", G_STRFUNC, mount_source);
+ udisks_warning ("%s is not a block device", mount_source);
continue;
}
if (sscanf (lines[n], "%s", filename) != 1)
{
- g_warning ("%s: Error parsing line '%s'", G_STRFUNC, lines[n]);
+ udisks_warning ("Error parsing line '%s'", lines[n]);
continue;
}
if (stat (filename, &statbuf) != 0)
{
- g_warning ("%s: Error statting %s: %m", G_STRFUNC, filename);
+ udisks_warning ("Error statting %s: %m", filename);
continue;
}
error = NULL;
if (!udisks_mount_monitor_get_mountinfo (monitor, &error))
{
- g_warning ("Error getting mounts: %s (%s, %d)",
- error->message, g_quark_to_string (error->domain), error->code);
+ udisks_warning ("Error getting mounts: %s (%s, %d)",
+ error->message, g_quark_to_string (error->domain), error->code);
g_error_free (error);
}
error = NULL;
if (!udisks_mount_monitor_get_swaps (monitor, &error))
{
- g_warning ("Error getting swaps: %s (%s, %d)",
- error->message, g_quark_to_string (error->domain), error->code);
+ udisks_warning ("Error getting swaps: %s (%s, %d)",
+ error->message, g_quark_to_string (error->domain), error->code);
g_error_free (error);
}