user = bus_config_parser_get_user (parser);
if (user == NULL)
{
- _dbus_warn ("User was NULL!\n");
+ _dbus_warn ("User was NULL!");
goto finish;
}
#if 0
/* the username can be configured in configure.in so this test doesn't work */
if (strcmp (user, "dbus") != 0)
{
- _dbus_warn ("User was invalid; '%s'!\n", user);
+ _dbus_warn ("User was invalid; '%s'!", user);
goto finish;
}
printf (" <user>dbus</user> OKAY!\n");
type = bus_config_parser_get_type (parser);
if (type == NULL)
{
- _dbus_warn ("Type was NULL!\n");
+ _dbus_warn ("Type was NULL!");
goto finish;
}
if (strcmp (type, "system") != 0)
{
- _dbus_warn ("Type was invalid; '%s'!\n", user);
+ _dbus_warn ("Type was invalid; '%s'!", user);
goto finish;
}
printf (" <type>system</type> OKAY!\n");
dirs = bus_config_parser_get_service_dirs (parser);
if (dirs == NULL)
{
- _dbus_warn ("Service dirs are NULL!\n");
+ _dbus_warn ("Service dirs are NULL!");
goto finish;
}
printf (" <standard_system_service_dirs/> OKAY!\n");
}
else if (validity == VALID)
{
- _dbus_warn ("Failed to load valid file but still had memory: %s\n",
+ _dbus_warn ("Failed to load valid file but still had memory: %s",
error.message);
dbus_error_free (&error);
if (validity == INVALID)
{
- _dbus_warn ("Accepted invalid file\n");
+ _dbus_warn ("Accepted invalid file");
return FALSE;
}
dir = _dbus_directory_open (&test_directory, &error);
if (dir == NULL)
{
- _dbus_warn ("Could not open %s: %s\n",
+ _dbus_warn ("Could not open %s: %s",
_dbus_string_get_const_data (&test_directory),
error.message);
dbus_error_free (&error);
if (dbus_error_is_set (&error))
{
- _dbus_warn ("Could not get next file in %s: %s\n",
+ _dbus_warn ("Could not get next file in %s: %s",
_dbus_string_get_const_data (&test_directory),
error.message);
dbus_error_free (&error);
&e->d.policy.gid_uid_or_at_console))
e->d.policy.type = POLICY_USER;
else
- _dbus_warn ("Unknown username \"%s\" in message bus configuration file\n",
+ _dbus_warn ("Unknown username \"%s\" in message bus configuration file",
user);
}
else if (group != NULL)
&e->d.policy.gid_uid_or_at_console))
e->d.policy.type = POLICY_GROUP;
else
- _dbus_warn ("Unknown group \"%s\" in message bus configuration file\n",
+ _dbus_warn ("Unknown group \"%s\" in message bus configuration file",
group);
}
else if (at_console != NULL)
}
else
{
- _dbus_warn ("Unknown username \"%s\" on element <%s>\n",
+ _dbus_warn ("Unknown username \"%s\" on element <%s>",
user, element_name);
}
}
}
else
{
- _dbus_warn ("Unknown group \"%s\" on element <%s>\n",
+ _dbus_warn ("Unknown group \"%s\" on element <%s>",
group, element_name);
}
}
ret ? "allowed" : "not allowed");
if (checks[i].allowed && !ret)
{
- _dbus_warn ("Cannot own %s\n", checks[i].name);
+ _dbus_warn ("Cannot own %s", checks[i].name);
return FALSE;
}
if (!checks[i].allowed && ret)
{
- _dbus_warn ("Can own %s\n", checks[i].name);
+ _dbus_warn ("Can own %s", checks[i].name);
return FALSE;
}
_dbus_string_free (&service_name);
}
else if (validity == VALID)
{
- _dbus_warn ("Failed to load valid file but still had memory: %s\n",
+ _dbus_warn ("Failed to load valid file but still had memory: %s",
error.message);
dbus_error_free (&error);
if (validity == INVALID)
{
- _dbus_warn ("Accepted invalid file\n");
+ _dbus_warn ("Accepted invalid file");
return FALSE;
}
dir = _dbus_directory_open (&test_directory, &error);
if (dir == NULL)
{
- _dbus_warn ("Could not open %s: %s\n",
+ _dbus_warn ("Could not open %s: %s",
_dbus_string_get_const_data (&test_directory),
error.message);
dbus_error_free (&error);
if (dbus_error_is_set (&error))
{
- _dbus_warn ("Could not get next file in %s: %s\n",
+ _dbus_warn ("Could not get next file in %s: %s",
_dbus_string_get_const_data (&test_directory),
error.message);
dbus_error_free (&error);
dir = _dbus_directory_open (target_directory, &error);
if (dir == NULL)
{
- _dbus_warn ("Could not open %s: %s\n",
+ _dbus_warn ("Could not open %s: %s",
_dbus_string_get_const_data (target_directory),
error.message);
dbus_error_free (&error);
if (parser == NULL)
{
- _dbus_warn ("Could not load file %s: %s\n",
+ _dbus_warn ("Could not load file %s: %s",
_dbus_string_get_const_data (&full_path),
error.message);
_dbus_string_free (&full_path);
dir = _dbus_directory_open (&test_directory, &error);
if (dir == NULL)
{
- _dbus_warn ("Could not open %s: %s\n",
+ _dbus_warn ("Could not open %s: %s",
_dbus_string_get_const_data (&test_directory),
error.message);
dbus_error_free (&error);
/* Not all service directories need to exist. */
if (errno != ENOENT)
{
- _dbus_warn ("Cannot setup inotify for '%s'; error '%s'\n", new_dirs[i], _dbus_strerror (errno));
+ _dbus_warn ("Cannot setup inotify for '%s'; error '%s'", new_dirs[i], _dbus_strerror (errno));
goto out;
}
else
#endif
if (inotify_fd <= 0)
{
- _dbus_warn ("Cannot initialize inotify\n");
+ _dbus_warn ("Cannot initialize inotify");
goto out;
}
if (watch == NULL)
{
- _dbus_warn ("Unable to create inotify watch\n");
+ _dbus_warn ("Unable to create inotify watch");
goto out;
}
kq = kqueue ();
if (kq < 0)
{
- _dbus_warn ("Cannot create kqueue; error '%s'\n", _dbus_strerror (errno));
+ _dbus_warn ("Cannot create kqueue; error '%s'", _dbus_strerror (errno));
goto out;
}
if (watch == NULL)
{
- _dbus_warn ("Unable to create kqueue watch\n");
+ _dbus_warn ("Unable to create kqueue watch");
goto out1;
}
{
if (errno != ENOENT)
{
- _dbus_warn ("Cannot open directory '%s'; error '%s'\n", new_dirs[i], _dbus_strerror (errno));
+ _dbus_warn ("Cannot open directory '%s'; error '%s'", new_dirs[i], _dbus_strerror (errno));
goto out;
}
else
NOTE_DELETE | NOTE_EXTEND | NOTE_WRITE | NOTE_RENAME, 0, 0);
if (kevent (kq, &ev, 1, NULL, 0, NULL) == -1)
{
- _dbus_warn ("Cannot setup a kevent for '%s'; error '%s'\n", new_dirs[i], _dbus_strerror (errno));
+ _dbus_warn ("Cannot setup a kevent for '%s'; error '%s'", new_dirs[i], _dbus_strerror (errno));
close (fd);
goto out;
}
int line)
{
if (message)
- _dbus_warn ("%s:%d received message interface \"%s\" member \"%s\" error name \"%s\" on %p, expecting %s\n",
+ _dbus_warn ("%s:%d received message interface \"%s\" member \"%s\" error name \"%s\" on %p, expecting %s",
function, line,
dbus_message_get_interface (message) ?
dbus_message_get_interface (message) : "(unset)",
connection,
expected);
else
- _dbus_warn ("%s:%d received no message on %p, expecting %s\n",
+ _dbus_warn ("%s:%d received no message on %p, expecting %s",
function, line, connection, expected);
}
message = pop_message_waiting_for_memory (connection);
if (message == NULL)
{
- _dbus_warn ("Did not receive a message on %p, expecting %s\n",
+ _dbus_warn ("Did not receive a message on %p, expecting %s",
connection, "NameOwnerChanged");
goto out;
}
}
else
{
- _dbus_warn ("Did not get the expected arguments\n");
+ _dbus_warn ("Did not get the expected arguments");
goto out;
}
}
|| (d->expected_kind == OWNER_CHANGED && (!old_owner[0] || !new_owner[0]))
|| (d->expected_kind == SERVICE_DELETED && (!old_owner[0] || new_owner[0])))
{
- _dbus_warn ("inconsistent NameOwnerChanged arguments\n");
+ _dbus_warn ("inconsistent NameOwnerChanged arguments");
goto out;
}
if (strcmp (service_name, d->expected_service_name) != 0)
{
- _dbus_warn ("expected info on service %s, got info on %s\n",
+ _dbus_warn ("expected info on service %s, got info on %s",
d->expected_service_name,
service_name);
goto out;
if (*service_name == ':' && new_owner[0]
&& strcmp (service_name, new_owner) != 0)
{
- _dbus_warn ("inconsistent ServiceOwnedChanged message (\"%s\" [ %s -> %s ])\n",
+ _dbus_warn ("inconsistent ServiceOwnedChanged message (\"%s\" [ %s -> %s ])",
service_name, old_owner, new_owner);
goto out;
}
message = pop_message_waiting_for_memory (connection);
if (message == NULL)
{
- _dbus_warn ("Did not receive a reply to %s %d on %p\n",
+ _dbus_warn ("Did not receive a reply to %s %d on %p",
"Hello", serial, connection);
goto out;
}
if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS))
{
- _dbus_warn ("Message has wrong sender %s\n",
+ _dbus_warn ("Message has wrong sender %s",
dbus_message_get_sender (message) ?
dbus_message_get_sender (message) : "(none)");
goto out;
else
{
_dbus_assert (dbus_error_is_set (&error));
- _dbus_warn ("Did not get the expected single string argument to hello\n");
+ _dbus_warn ("Did not get the expected single string argument to hello");
goto out;
}
}
message = pop_message_waiting_for_memory (connection);
if (message == NULL)
{
- _dbus_warn ("Expecting %s, got nothing\n",
+ _dbus_warn ("Expecting %s, got nothing",
"NameAcquired");
goto out;
}
if (! dbus_message_is_signal (message, DBUS_INTERFACE_DBUS,
"NameAcquired"))
{
- _dbus_warn ("Expecting %s, got smthg else\n",
+ _dbus_warn ("Expecting %s, got smthg else",
"NameAcquired");
goto out;
}
else
{
_dbus_assert (dbus_error_is_set (&error));
- _dbus_warn ("Did not get the expected single string argument to ServiceAcquired\n");
+ _dbus_warn ("Did not get the expected single string argument to ServiceAcquired");
goto out;
}
}
if (strcmp (acquired, name) != 0)
{
- _dbus_warn ("Acquired name is %s but expected %s\n",
+ _dbus_warn ("Acquired name is %s but expected %s",
acquired, name);
goto out;
}
message = pop_message_waiting_for_memory (connection);
if (message == NULL)
{
- _dbus_warn ("Did not receive a reply to %s %d on %p\n",
+ _dbus_warn ("Did not receive a reply to %s %d on %p",
"Hello", serial, connection);
goto out;
}
if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS))
{
- _dbus_warn ("Message has wrong sender %s\n",
+ _dbus_warn ("Message has wrong sender %s",
dbus_message_get_sender (message) ?
dbus_message_get_sender (message) : "(none)");
goto out;
message = pop_message_waiting_for_memory (connection);
if (message == NULL)
{
- _dbus_warn ("Did not receive a reply to %s %d on %p\n",
+ _dbus_warn ("Did not receive a reply to %s %d on %p",
"GetConnectionUnixUser", serial, connection);
goto out;
}
else
{
_dbus_assert (dbus_error_is_set (&error));
- _dbus_warn ("Did not get the expected DBUS_TYPE_UINT32 from GetConnectionUnixUser\n");
+ _dbus_warn ("Did not get the expected DBUS_TYPE_UINT32 from GetConnectionUnixUser");
goto out;
}
}
message = pop_message_waiting_for_memory (connection);
if (message == NULL)
{
- _dbus_warn ("Did not receive a reply to %s %d on %p\n",
+ _dbus_warn ("Did not receive a reply to %s %d on %p",
"GetConnectionUnixProcessID", serial, connection);
goto out;
}
else
{
_dbus_assert (dbus_error_is_set (&error));
- _dbus_warn ("Did not get the expected DBUS_TYPE_UINT32 from GetConnectionUnixProcessID\n");
+ _dbus_warn ("Did not get the expected DBUS_TYPE_UINT32 from GetConnectionUnixProcessID");
goto out;
}
}
if (pid != (dbus_uint32_t) _dbus_getpid ())
{
_dbus_assert (dbus_error_is_set (&error));
- _dbus_warn ("Result from GetConnectionUnixProcessID is not our own pid\n");
+ _dbus_warn ("Result from GetConnectionUnixProcessID is not our own pid");
goto out;
}
}
message = pop_message_waiting_for_memory (connection);
if (message == NULL)
{
- _dbus_warn ("Did not receive a reply to %s %d on %p\n",
+ _dbus_warn ("Did not receive a reply to %s %d on %p",
"AddMatch", serial, connection);
goto out;
}
if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS))
{
- _dbus_warn ("Message has wrong sender %s\n",
+ _dbus_warn ("Message has wrong sender %s",
dbus_message_get_sender (message) ?
dbus_message_get_sender (message) : "(none)");
goto out;
message = pop_message_waiting_for_memory (connection);
if (message == NULL)
{
- _dbus_warn ("Did not receive a reply to %s %d on %p\n",
+ _dbus_warn ("Did not receive a reply to %s %d on %p",
"AddMatch", serial, connection);
goto out;
}
if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS))
{
- _dbus_warn ("Message has wrong sender %s\n",
+ _dbus_warn ("Message has wrong sender %s",
dbus_message_get_sender (message) ?
dbus_message_get_sender (message) : "(none)");
goto out;
message = pop_message_waiting_for_memory (connection);
if (message == NULL)
{
- _dbus_warn ("Did not receive a reply to %s %d on %p\n",
+ _dbus_warn ("Did not receive a reply to %s %d on %p",
"StartServiceByName", serial, connection);
goto out;
}
{
if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS))
{
- _dbus_warn ("Message has wrong sender %s\n",
+ _dbus_warn ("Message has wrong sender %s",
dbus_message_get_sender (message) ?
dbus_message_get_sender (message) : "(none)");
goto out;
}
else
{
- _dbus_warn ("Did not expect to successfully activate %s\n",
+ _dbus_warn ("Did not expect to successfully activate %s",
NONEXISTENT_SERVICE_NAME);
goto out;
}
if (message == NULL)
{
- _dbus_warn ("Did not receive a reply to %s %d on %p\n",
+ _dbus_warn ("Did not receive a reply to %s %d on %p",
"Echo message (auto activation)", serial, connection);
goto out;
}
{
if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS))
{
- _dbus_warn ("Message has wrong sender %s\n",
+ _dbus_warn ("Message has wrong sender %s",
dbus_message_get_sender (message) ?
dbus_message_get_sender (message) : "(none)");
goto out;
}
else
{
- _dbus_warn ("Did not expect to successfully activate %s\n",
+ _dbus_warn ("Did not expect to successfully activate %s",
NONEXISTENT_SERVICE_NAME);
goto out;
}
}
else
{
- _dbus_warn ("Message %s doesn't have a service name: %s\n",
+ _dbus_warn ("Message %s doesn't have a service name: %s",
"NameOwnerChanged (creation)",
error.message);
goto out;
if (*base_service != ':')
{
- _dbus_warn ("Expected base service activation, got \"%s\" instead\n",
+ _dbus_warn ("Expected base service activation, got \"%s\" instead",
base_service);
goto out;
}
if (strcmp (base_service, base_service_from_bus) != 0)
{
- _dbus_warn ("Expected base service activation, got \"%s\" instead with owner \"%s\"\n",
+ _dbus_warn ("Expected base service activation, got \"%s\" instead with owner \"%s\"",
base_service, base_service_from_bus);
goto out;
}
if (old_owner[0])
{
- _dbus_warn ("Received an old_owner argument during base service activation, \"%s\"\n",
+ _dbus_warn ("Received an old_owner argument during base service activation, \"%s\"",
old_owner);
goto out;
}
}
else
{
- _dbus_warn ("Message %s doesn't have a service name: %s\n",
+ _dbus_warn ("Message %s doesn't have a service name: %s",
"NameOwnerChanged (creation)",
error.message);
goto out;
if (strcmp (service_name, activated_name) != 0)
{
- _dbus_warn ("Expected to see service %s created, saw %s instead\n",
+ _dbus_warn ("Expected to see service %s created, saw %s instead",
activated_name, service_name);
goto out;
}
if (strcmp (base_service_name, base_service_from_bus) != 0)
{
- _dbus_warn ("NameOwnerChanged reports wrong base service: %s owner, expected %s instead\n",
+ _dbus_warn ("NameOwnerChanged reports wrong base service: %s owner, expected %s instead",
base_service_from_bus, base_service_name);
goto out;
}
if (old_owner[0])
{
- _dbus_warn ("expected a %s, got a %s\n",
+ _dbus_warn ("expected a %s, got a %s",
"NameOwnerChanged (creation)",
"NameOwnerChanged (change)");
goto out;
message = pop_message_waiting_for_memory (connection);
if (message == NULL)
{
- _dbus_warn ("Expected a reply to %s, got nothing\n",
+ _dbus_warn ("Expected a reply to %s, got nothing",
"StartServiceByName");
goto out;
}
{
if (!dbus_error_has_name (&error, DBUS_ERROR_NO_MEMORY))
{
- _dbus_warn ("Did not have activation result first argument to %s: %s\n",
+ _dbus_warn ("Did not have activation result first argument to %s: %s",
"StartServiceByName", error.message);
goto out;
}
; /* Good also */
else
{
- _dbus_warn ("Activation result was %u, no good.\n",
+ _dbus_warn ("Activation result was %u, no good.",
activation_result);
goto out;
}
if (!check_no_leftovers (context))
{
- _dbus_warn ("Messages were left over after verifying existent activation results\n");
+ _dbus_warn ("Messages were left over after verifying existent activation results");
goto out;
}
}
else
{
- _dbus_warn ("Message %s doesn't have a service name: %s\n",
+ _dbus_warn ("Message %s doesn't have a service name: %s",
"NameOwnerChanged",
error.message);
dbus_error_free (&error);
if (strcmp (service_name, activated_name) != 0)
{
- _dbus_warn ("Expected to see service %s created, saw %s instead\n",
+ _dbus_warn ("Expected to see service %s created, saw %s instead",
activated_name, service_name);
goto out;
}
if (!check_no_leftovers (context))
{
- _dbus_warn ("Messages were left over after %s\n",
+ _dbus_warn ("Messages were left over after %s",
_DBUS_FUNCTION_NAME);
goto out;
}
message = pop_message_waiting_for_memory (connection);
if (message == NULL)
{
- _dbus_warn ("Did not get an expected error\n");
+ _dbus_warn ("Did not get an expected error");
goto out;
}
if (!error_found)
{
- _dbus_warn ("Expected error %s or other, got %s instead\n",
+ _dbus_warn ("Expected error %s or other, got %s instead",
first_error_name,
dbus_message_get_error_name (message));
goto out;
}
else
{
- _dbus_warn ("unexpected arguments for NameOwnerChanged message\n");
+ _dbus_warn ("unexpected arguments for NameOwnerChanged message");
message_kind = GOT_SOMETHING_ELSE;
}
}
message = pop_message_waiting_for_memory (connection);
if (message == NULL)
{
- _dbus_warn ("Did not receive any messages after %s %d on %p\n",
+ _dbus_warn ("Did not receive any messages after %s %d on %p",
"StartServiceByName", serial, connection);
goto out;
}
{
if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS))
{
- _dbus_warn ("Message has wrong sender %s\n",
+ _dbus_warn ("Message has wrong sender %s",
dbus_message_get_sender (message) ?
dbus_message_get_sender (message) : "(none)");
goto out;
}
else
{
- _dbus_warn ("Did not expect error %s\n",
+ _dbus_warn ("Did not expect error %s",
dbus_message_get_error_name (message));
goto out;
}
message = dbus_connection_borrow_message (connection);
if (message == NULL)
{
- _dbus_warn ("Did not receive any messages after base service creation notification\n");
+ _dbus_warn ("Did not receive any messages after base service creation notification");
goto out;
}
if (message == NULL)
{
_dbus_warn ("Failed to pop message we just put back! "
- "should have been a NameOwnerChanged (creation)\n");
+ "should have been a NameOwnerChanged (creation)");
goto out;
}
if (!check_no_leftovers (context))
{
- _dbus_warn ("Messages were left over after successful activation\n");
+ _dbus_warn ("Messages were left over after successful activation");
goto out;
}
message = pop_message_waiting_for_memory (connection);
if (message == NULL)
{
- _dbus_warn ("Did not receive a reply to %s %d on %p\n",
+ _dbus_warn ("Did not receive a reply to %s %d on %p",
"StartServiceByName", serial, connection);
goto out;
}
{
if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS))
{
- _dbus_warn ("Message has wrong sender %s\n",
+ _dbus_warn ("Message has wrong sender %s",
dbus_message_get_sender (message) ?
dbus_message_get_sender (message) : "(none)");
goto out;
}
else
{
- _dbus_warn ("Did not expect to successfully activate segfault service\n");
+ _dbus_warn ("Did not expect to successfully activate segfault service");
goto out;
}
message = pop_message_waiting_for_memory (connection);
if (message == NULL)
{
- _dbus_warn ("Did not receive a reply to %s %d on %p\n",
+ _dbus_warn ("Did not receive a reply to %s %d on %p",
"Echo message (auto activation)", serial, connection);
goto out;
}
{
if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS))
{
- _dbus_warn ("Message has wrong sender %s\n",
+ _dbus_warn ("Message has wrong sender %s",
dbus_message_get_sender (message) ?
dbus_message_get_sender (message) : "(none)");
goto out;
}
else
{
- _dbus_warn ("Did not expect to successfully activate segfault service\n");
+ _dbus_warn ("Did not expect to successfully activate segfault service");
goto out;
}
message = pop_message_waiting_for_memory (connection);
if (message == NULL)
{
- _dbus_warn ("Failed to pop message! Should have been reply from RunHelloFromSelf message\n");
+ _dbus_warn ("Failed to pop message! Should have been reply from RunHelloFromSelf message");
return FALSE;
}
if (dbus_message_get_reply_serial (message) != serial)
{
- _dbus_warn ("Wrong reply serial\n");
+ _dbus_warn ("Wrong reply serial");
dbus_message_unref (message);
return FALSE;
}
message = pop_message_waiting_for_memory (connection);
if (message == NULL)
{
- _dbus_warn ("Failed to pop message! Should have been reply from Ping message\n");
+ _dbus_warn ("Failed to pop message! Should have been reply from Ping message");
return FALSE;
}
if (dbus_message_get_reply_serial (message) != serial)
{
- _dbus_warn ("Wrong reply serial\n");
+ _dbus_warn ("Wrong reply serial");
dbus_message_unref (message);
return FALSE;
}
if (dbus_message_get_type (message) != DBUS_MESSAGE_TYPE_METHOD_RETURN)
{
- _dbus_warn ("Unexpected message return during Ping\n");
+ _dbus_warn ("Unexpected message return during Ping");
dbus_message_unref (message);
return FALSE;
}
message = pop_message_waiting_for_memory (connection);
if (message == NULL)
{
- _dbus_warn ("Failed to pop message! Should have been reply from GetMachineId message\n");
+ _dbus_warn ("Failed to pop message! Should have been reply from GetMachineId message");
return FALSE;
}
if (dbus_message_get_reply_serial (message) != serial)
{
- _dbus_warn ("Wrong reply serial\n");
+ _dbus_warn ("Wrong reply serial");
dbus_message_unref (message);
return FALSE;
}
if (dbus_message_get_type (message) != DBUS_MESSAGE_TYPE_METHOD_RETURN)
{
- _dbus_warn ("Unexpected message return during GetMachineId\n");
+ _dbus_warn ("Unexpected message return during GetMachineId");
dbus_message_unref (message);
return FALSE;
}
machine_id = NULL;
if (!dbus_message_get_args (message, NULL, DBUS_TYPE_STRING, &machine_id, DBUS_TYPE_INVALID))
{
- _dbus_warn ("Did not get a machine ID in reply to GetMachineId\n");
+ _dbus_warn ("Did not get a machine ID in reply to GetMachineId");
dbus_message_unref (message);
return FALSE;
}
if (machine_id == NULL || strlen (machine_id) != 32)
{
- _dbus_warn ("Machine id looks bogus: '%s'\n", machine_id ? machine_id : "null");
+ _dbus_warn ("Machine id looks bogus: '%s'", machine_id ? machine_id : "null");
dbus_message_unref (message);
return FALSE;
}
message = pop_message_waiting_for_memory (connection);
if (message == NULL)
{
- _dbus_warn ("Did not receive any messages after auto start %d on %p\n",
+ _dbus_warn ("Did not receive any messages after auto start %d on %p",
serial, connection);
goto out;
}
if (message == NULL)
{
_dbus_warn ("No message after auto activation "
- "(should be a service announcement)\n");
+ "(should be a service announcement)");
dbus_connection_return_message (connection, message);
message = NULL;
goto out;
if (message == NULL)
{
_dbus_warn ("Failed to pop message we just put back! "
- "should have been a NameOwnerChanged (creation)\n");
+ "should have been a NameOwnerChanged (creation)");
goto out;
}
case GOT_ERROR:
case GOT_SOMETHING_ELSE:
- _dbus_warn ("Unexpected message after auto activation\n");
+ _dbus_warn ("Unexpected message after auto activation");
goto out;
}
}
message = pop_message_waiting_for_memory (connection);
if (message == NULL)
{
- _dbus_warn ("Failed to pop message! Should have been reply from echo message\n");
+ _dbus_warn ("Failed to pop message! Should have been reply from echo message");
goto out;
}
if (dbus_message_get_reply_serial (message) != serial)
{
- _dbus_warn ("Wrong reply serial\n");
+ _dbus_warn ("Wrong reply serial");
goto out;
}
message = pop_message_waiting_for_memory (connection);
if (message == NULL)
{
- _dbus_warn ("Did not receive a reply to %s %d on %p\n",
+ _dbus_warn ("Did not receive a reply to %s %d on %p",
"Echo message (auto activation)", serial, connection);
goto out;
}
{
if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS))
{
- _dbus_warn ("Message has wrong sender %s\n",
+ _dbus_warn ("Message has wrong sender %s",
dbus_message_get_sender (message) ?
dbus_message_get_sender (message) : "(none)");
goto out;
}
else
{
- _dbus_warn ("Did not expect to successfully auto-start missing service\n");
+ _dbus_warn ("Did not expect to successfully auto-start missing service");
goto out;
}
if (!dbus_connection_get_is_connected (connection))
{
- _dbus_warn ("connection was disconnected\n");
+ _dbus_warn ("connection was disconnected");
return TRUE;
}
message = pop_message_waiting_for_memory (connection);
if (message == NULL)
{
- _dbus_warn ("Did not receive a reply to %s %d on %p\n",
+ _dbus_warn ("Did not receive a reply to %s %d on %p",
"Echo message (auto activation)", serial, connection);
goto out;
}
{
if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS))
{
- _dbus_warn ("Message has wrong sender %s\n",
+ _dbus_warn ("Message has wrong sender %s",
dbus_message_get_sender (message) ?
dbus_message_get_sender (message) : "(none)");
goto out;
}
else
{
- _dbus_warn ("Did not expect to successfully auto-start missing service\n");
+ _dbus_warn ("Did not expect to successfully auto-start missing service");
goto out;
}
if (!dbus_connection_get_is_connected (connection))
{
- _dbus_warn ("connection was disconnected\n");
+ _dbus_warn ("connection was disconnected");
return TRUE;
}
message = pop_message_waiting_for_memory (connection);
if (message == NULL)
{
- _dbus_warn ("Did not receive a reply to %s %d on %p\n",
+ _dbus_warn ("Did not receive a reply to %s %d on %p",
"Echo message (auto activation)", serial, connection);
goto out;
}
{
if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS))
{
- _dbus_warn ("Message has wrong sender %s\n",
+ _dbus_warn ("Message has wrong sender %s",
dbus_message_get_sender (message) ?
dbus_message_get_sender (message) : "(none)");
goto out;
}
else
{
- _dbus_warn ("Did not expect to successfully auto-start missing service\n");
+ _dbus_warn ("Did not expect to successfully auto-start missing service");
goto out;
}
if (!dbus_connection_get_is_connected (connection))
{
- _dbus_warn ("connection was disconnected\n");
+ _dbus_warn ("connection was disconnected");
return TRUE;
}
message = pop_message_waiting_for_memory (connection);
if (message == NULL)
{
- _dbus_warn ("Did not receive a reply to %s %d on %p\n",
+ _dbus_warn ("Did not receive a reply to %s %d on %p",
"Echo message (auto activation)", serial, connection);
goto out;
}
{
if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS))
{
- _dbus_warn ("Message has wrong sender %s\n",
+ _dbus_warn ("Message has wrong sender %s",
dbus_message_get_sender (message) ?
dbus_message_get_sender (message) : "(none)");
goto out;
}
else
{
- _dbus_warn ("Did not expect to successfully auto-start missing service\n");
+ _dbus_warn ("Did not expect to successfully auto-start missing service");
goto out;
}
message = pop_message_waiting_for_memory (connection);
if (message == NULL)
{
- _dbus_warn ("Did not receive a reply to %s %d on %p\n",
+ _dbus_warn ("Did not receive a reply to %s %d on %p",
"Echo message (auto activation)", serial, connection);
goto out;
}
{
if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS))
{
- _dbus_warn ("Message has wrong sender %s\n",
+ _dbus_warn ("Message has wrong sender %s",
dbus_message_get_sender (message) ?
dbus_message_get_sender (message) : "(none)");
goto out;
}
else
{
- _dbus_warn ("Did not expect to successfully auto-start shell fail service\n");
+ _dbus_warn ("Did not expect to successfully auto-start shell fail service");
goto out;
}
message = pop_message_waiting_for_memory (connection);
if (message == NULL)
{
- _dbus_warn ("Did not receive any messages after auto start %d on %p\n",
+ _dbus_warn ("Did not receive any messages after auto start %d on %p",
serial, connection);
goto out;
}
if (message == NULL)
{
_dbus_warn ("No message after auto activation "
- "(should be a service announcement)\n");
+ "(should be a service announcement)");
dbus_connection_return_message (connection, message);
message = NULL;
goto out;
if (message == NULL)
{
_dbus_warn ("Failed to pop message we just put back! "
- "should have been a NameOwnerChanged (creation)\n");
+ "should have been a NameOwnerChanged (creation)");
goto out;
}
case GOT_ERROR:
case GOT_SOMETHING_ELSE:
- _dbus_warn ("Unexpected message after auto activation\n");
+ _dbus_warn ("Unexpected message after auto activation");
goto out;
}
}
message = pop_message_waiting_for_memory (connection);
if (message == NULL)
{
- _dbus_warn ("Failed to pop message! Should have been reply from echo message\n");
+ _dbus_warn ("Failed to pop message! Should have been reply from echo message");
goto out;
}
if (dbus_message_get_reply_serial (message) != serial)
{
- _dbus_warn ("Wrong reply serial\n");
+ _dbus_warn ("Wrong reply serial");
goto out;
}
DBUS_TYPE_STRING, &argv[6],
DBUS_TYPE_INVALID))
{
- _dbus_warn ("Error getting arguments from return\n");
+ _dbus_warn ("Error getting arguments from return");
goto out;
}
*/
if (strcmp("-test", argv[1]) != 0)
{
- _dbus_warn ("Unexpected argv[1] in shell success service test (expected: %s, got: %s)\n",
+ _dbus_warn ("Unexpected argv[1] in shell success service test (expected: %s, got: %s)",
"-test", argv[1]);
goto out;
}
if (strcmp("that", argv[2]) != 0)
{
- _dbus_warn ("Unexpected argv[2] in shell success service test (expected: %s, got: %s)\n",
+ _dbus_warn ("Unexpected argv[2] in shell success service test (expected: %s, got: %s)",
"that", argv[2]);
goto out;
}
if (strcmp("we get", argv[3]) != 0)
{
- _dbus_warn ("Unexpected argv[3] in shell success service test (expected: %s, got: %s)\n",
+ _dbus_warn ("Unexpected argv[3] in shell success service test (expected: %s, got: %s)",
"we get", argv[3]);
goto out;
}
if (strcmp("back", argv[4]) != 0)
{
- _dbus_warn ("Unexpected argv[4] in shell success service test (expected: %s, got: %s)\n",
+ _dbus_warn ("Unexpected argv[4] in shell success service test (expected: %s, got: %s)",
"back", argv[4]);
goto out;
}
if (strcmp("--what", argv[5]) != 0)
{
- _dbus_warn ("Unexpected argv[5] in shell success service test (expected: %s, got: %s)\n",
+ _dbus_warn ("Unexpected argv[5] in shell success service test (expected: %s, got: %s)",
"--what", argv[5]);
goto out;
}
if (strcmp("we put in", argv[6]) != 0)
{
- _dbus_warn ("Unexpected argv[6] in shell success service test (expected: %s, got: %s)\n",
+ _dbus_warn ("Unexpected argv[6] in shell success service test (expected: %s, got: %s)",
"we put in", argv[6]);
goto out;
}
if (!check_no_leftovers (d->context))
{
- _dbus_warn ("Messages were left over, should be covered by test suite\n");
+ _dbus_warn ("Messages were left over, should be covered by test suite");
return FALSE;
}
message = pop_message_waiting_for_memory (connection);
if (message == NULL)
{
- _dbus_warn ("Did not receive a reply to %s %d on %p\n",
+ _dbus_warn ("Did not receive a reply to %s %d on %p",
method, serial, connection);
goto out;
}
else
{
_dbus_assert (dbus_error_is_set (&error));
- _dbus_warn ("Did not get the expected DBUS_TYPE_ARRAY from %s\n", method);
+ _dbus_warn ("Did not get the expected DBUS_TYPE_ARRAY from %s", method);
goto out;
}
} else {
if (!_dbus_string_array_contains ((const char **)services, existent))
{
- _dbus_warn ("Did not get the expected %s from ListActivatableNames\n", existent);
+ _dbus_warn ("Did not get the expected %s from ListActivatableNames", existent);
dbus_free_string_array (services);
return FALSE;
}
message = pop_message_waiting_for_memory (connection);
if (message == NULL)
{
- _dbus_warn ("Did not receive any messages after %s %d on %p\n",
+ _dbus_warn ("Did not receive any messages after %s %d on %p",
"StartServiceByName", serial, connection);
goto out;
}
{
if (!dbus_message_has_sender (message, DBUS_SERVICE_DBUS))
{
- _dbus_warn ("Message has wrong sender %s\n",
+ _dbus_warn ("Message has wrong sender %s",
dbus_message_get_sender (message) ?
dbus_message_get_sender (message) : "(none)");
goto out;
}
else
{
- _dbus_warn ("Did not expect error %s\n",
+ _dbus_warn ("Did not expect error %s",
dbus_message_get_error_name (message));
goto out;
}
message = dbus_connection_borrow_message (connection);
if (message == NULL)
{
- _dbus_warn ("Did not receive any messages after base service creation notification\n");
+ _dbus_warn ("Did not receive any messages after base service creation notification");
goto out;
}
case GOT_ERROR:
case GOT_SERVICE_DELETED:
_dbus_warn ("Unexpected message after ActivateService "
- "(should be an error or a service announcement)\n");
+ "(should be an error or a service announcement)");
goto out;
case GOT_SERVICE_CREATED:
if (message == NULL)
{
_dbus_warn ("Failed to pop message we just put back! "
- "should have been a NameOwnerChanged (creation)\n");
+ "should have been a NameOwnerChanged (creation)");
goto out;
}
if (!check_no_leftovers (context))
{
- _dbus_warn ("Messages were left over after successful activation\n");
+ _dbus_warn ("Messages were left over after successful activation");
goto out;
}
if (!_dbus_string_array_contains ((const char **)services, existent))
{
- _dbus_warn ("Did not get the expected %s from ListNames\n", existent);
+ _dbus_warn ("Did not get the expected %s from ListNames", existent);
goto out;
}
if (!check_no_leftovers (d->context))
{
- _dbus_warn ("Messages were left over, should be covered by test suite\n");
+ _dbus_warn ("Messages were left over, should be covered by test suite");
return FALSE;
}
if (!_dbus_test_oom_handling (description, check_oom_check2_func,
&d))
{
- _dbus_warn ("%s failed during oom\n", description);
+ _dbus_warn ("%s failed during oom", description);
_dbus_assert_not_reached ("test failed");
}
}
if (!check_no_leftovers (context))
{
- _dbus_warn ("Messages were left over after setting up initial connections\n");
+ _dbus_warn ("Messages were left over after setting up initial connections");
_dbus_assert_not_reached ("initial connection setup failed");
}
if (!check_no_leftovers (context))
{
- _dbus_warn ("Messages were left over after setting up initial SHA-1 connection\n");
+ _dbus_warn ("Messages were left over after setting up initial SHA-1 connection");
_dbus_assert_not_reached ("initial connection setup failed");
}
exit (0);
oom:
- _dbus_warn ("Can not introspect - Out of memory\n");
+ _dbus_warn ("Can not introspect - Out of memory");
exit (1);
}
if ((reload_pipe[RELOAD_READ_END].fd > 0) &&
_dbus_read_socket (reload_pipe[RELOAD_READ_END], &str, 1) != 1)
{
- _dbus_warn ("Couldn't read from reload pipe.\n");
+ _dbus_warn ("Couldn't read from reload pipe.");
close_reload_pipe (&watch);
return TRUE;
}
_DBUS_ASSERT_ERROR_IS_SET (&error);
_dbus_assert (dbus_error_has_name (&error, DBUS_ERROR_FAILED) ||
dbus_error_has_name (&error, DBUS_ERROR_NO_MEMORY));
- _dbus_warn ("Unable to reload configuration: %s\n",
+ _dbus_warn ("Unable to reload configuration: %s",
error.message);
dbus_error_free (&error);
}
if (!_dbus_socketpair (&reload_pipe[0], &reload_pipe[1],
TRUE, &error))
{
- _dbus_warn ("Unable to create reload pipe: %s\n",
+ _dbus_warn ("Unable to create reload pipe: %s",
error.message);
dbus_error_free (&error);
exit (1);
if (watch == NULL)
{
- _dbus_warn ("Unable to create reload watch: %s\n",
+ _dbus_warn ("Unable to create reload watch: %s",
error.message);
dbus_error_free (&error);
exit (1);
if (!_dbus_loop_add_watch (loop, watch))
{
- _dbus_warn ("Unable to add reload watch to main loop: %s\n",
+ _dbus_warn ("Unable to add reload watch to main loop: %s",
error.message);
dbus_error_free (&error);
exit (1);
if (!bus_selinux_pre_init ())
{
- _dbus_warn ("SELinux pre-initialization failed\n");
+ _dbus_warn ("SELinux pre-initialization failed");
exit (1);
}
if (!bus_apparmor_pre_init ())
{
- _dbus_warn ("AppArmor pre-initialization failed: out of memory\n");
+ _dbus_warn ("AppArmor pre-initialization failed: out of memory");
exit (1);
}
_dbus_string_free (&config_file);
if (context == NULL)
{
- _dbus_warn ("Failed to start message bus: %s\n",
+ _dbus_warn ("Failed to start message bus: %s",
error.message);
dbus_error_free (&error);
exit (1);
rc = pthread_create (&avc_notify_thread, NULL, (void *(*) (void *)) run, NULL);
if (rc != 0)
{
- _dbus_warn ("Failed to start AVC thread: %s\n", _dbus_strerror (rc));
+ _dbus_warn ("Failed to start AVC thread: %s", _dbus_strerror (rc));
exit (1);
}
return &avc_notify_thread;
avc_mutex = dbus_new (pthread_mutex_t, 1);
if (avc_mutex == NULL)
{
- _dbus_warn ("Could not create mutex: %s\n", _dbus_strerror (errno));
+ _dbus_warn ("Could not create mutex: %s", _dbus_strerror (errno));
exit (1);
}
pthread_mutex_init (avc_mutex, NULL);
r = is_selinux_enabled ();
if (r < 0)
{
- _dbus_warn ("Could not tell if SELinux is enabled: %s\n",
+ _dbus_warn ("Could not tell if SELinux is enabled: %s",
_dbus_strerror (errno));
return FALSE;
}
if (selinux_set_mapping (dbus_map) < 0)
{
- _dbus_warn ("Failed to set up security class mapping (selinux_set_mapping():%s).\n",
+ _dbus_warn ("Failed to set up security class mapping (selinux_set_mapping():%s).",
strerror (errno));
return FALSE;
}
avc_entry_ref_init (&aeref);
if (avc_init ("avc", &mem_cb, &log_cb, &thread_cb, &lock_cb) < 0)
{
- _dbus_warn ("Failed to start Access Vector Cache (AVC).\n");
+ _dbus_warn ("Failed to start Access Vector Cache (AVC).");
return FALSE;
}
else
if (avc_add_callback (policy_reload_callback, AVC_CALLBACK_RESET,
NULL, NULL, 0, 0) < 0)
{
- _dbus_warn ("Failed to add policy reload callback: %s\n",
+ _dbus_warn ("Failed to add policy reload callback: %s",
_dbus_strerror (errno));
avc_destroy ();
return FALSE;
"Error getting SID from context \"%s\": %s\n",
con, _dbus_strerror (errno));
- _dbus_warn ("Error getting SID from context \"%s\": %s\n",
+ _dbus_warn ("Error getting SID from context \"%s\": %s",
con, _dbus_strerror (errno));
freecon (con);
return FALSE;
}
- _dbus_warn ("Error getting SID from context \"%s\": %s\n",
+ _dbus_warn ("Error getting SID from context \"%s\": %s",
(char *) service_context,
_dbus_strerror (errno));
goto out;
if (should_succeed && rule == NULL)
{
- _dbus_warn ("Failed to parse: %s: %s: \"%s\"\n",
+ _dbus_warn ("Failed to parse: %s: %s: \"%s\"",
error.name, error.message,
_dbus_string_get_const_data (&str));
exit (1);
if (!should_succeed && rule != NULL)
{
- _dbus_warn ("Failed to fail to parse: \"%s\"\n",
+ _dbus_warn ("Failed to fail to parse: \"%s\"",
_dbus_string_get_const_data (&str));
exit (1);
}
if (!match_rule_equal (first, second))
{
- _dbus_warn ("rule %s and %s should have been equal\n",
+ _dbus_warn ("rule %s and %s should have been equal",
equality_tests[i].first,
equality_tests[i].second);
exit (1);
if (match_rule_equal (first, second))
{
- _dbus_warn ("rule %s and %s should not have been equal\n",
+ _dbus_warn ("rule %s and %s should not have been equal",
equality_tests[i].first,
equality_tests[j].second);
exit (1);
if (matched != expected_to_match)
{
- _dbus_warn ("Expected rule %s to %s message %d, failed\n",
+ _dbus_warn ("Expected rule %s to %s message %d, failed",
rule_text, expected_to_match ?
"match" : "not match", number);
exit (1);
if (matched != should_match)
{
_dbus_warn ("Expected rule %s to %s message "
- "with first arg %s of type '%c', failed\n",
+ "with first arg %s of type '%c', failed",
rule_text,
should_match ? "match" : "not match",
path,
printf ("%s: checking for memleaks\n", name);
if (_dbus_get_malloc_blocks_outstanding () != 0)
{
- _dbus_warn ("%d dbus_malloc blocks were not freed\n",
+ _dbus_warn ("%d dbus_malloc blocks were not freed",
_dbus_get_malloc_blocks_outstanding ());
die ("memleaks");
}
/* we failed, but a OOM is good */
if (!dbus_error_has_name (&error, DBUS_ERROR_NO_MEMORY))
{
- _dbus_warn ("FAILED SELF TEST: Error: %s\n", error.message);
+ _dbus_warn ("FAILED SELF TEST: Error: %s", error.message);
retval = FALSE;
}
dbus_error_free (&error);
printf ("%s: checking for memleaks\n", name);
if (_dbus_get_malloc_blocks_outstanding () != 0)
{
- _dbus_warn ("%d dbus_malloc blocks were not freed\n",
+ _dbus_warn ("%d dbus_malloc blocks were not freed",
_dbus_get_malloc_blocks_outstanding ());
die ("memleaks");
}
printf ("%s: checking for memleaks\n", name);
if (_dbus_get_malloc_blocks_outstanding () != 0)
{
- _dbus_warn ("%d dbus_malloc blocks were not freed\n",
+ _dbus_warn ("%d dbus_malloc blocks were not freed",
_dbus_get_malloc_blocks_outstanding ());
die ("memleaks");
}
if (!_dbus_string_init (&config_file))
{
- _dbus_warn ("No memory\n");
+ _dbus_warn ("No memory");
return NULL;
}
if (!_dbus_string_copy (test_data_dir, 0,
&config_file, 0))
{
- _dbus_warn ("No memory\n");
+ _dbus_warn ("No memory");
_dbus_string_free (&config_file);
return NULL;
}
if (!_dbus_concat_dir_and_file (&config_file, &relative))
{
- _dbus_warn ("No memory\n");
+ _dbus_warn ("No memory");
_dbus_string_free (&config_file);
return NULL;
}
{
_DBUS_ASSERT_ERROR_IS_SET (&error);
- _dbus_warn ("Failed to create debug bus context from configuration file %s: %s\n",
+ _dbus_warn ("Failed to create debug bus context from configuration file %s: %s",
filename, error.message);
dbus_error_free (&error);
if (strcmp (escaped, test->escaped) != 0)
{
- _dbus_warn ("Escaped '%s' as '%s' should have been '%s'\n",
+ _dbus_warn ("Escaped '%s' as '%s' should have been '%s'",
test->unescaped, escaped, test->escaped);
exit (1);
}
unescaped = dbus_address_unescape_value (test->escaped, &error);
if (unescaped == NULL)
{
- _dbus_warn ("Failed to unescape '%s': %s\n",
+ _dbus_warn ("Failed to unescape '%s': %s",
test->escaped, error.message);
dbus_error_free (&error);
exit (1);
if (strcmp (unescaped, test->unescaped) != 0)
{
- _dbus_warn ("Unescaped '%s' as '%s' should have been '%s'\n",
+ _dbus_warn ("Unescaped '%s' as '%s' should have been '%s'",
test->escaped, unescaped, test->unescaped);
exit (1);
}
&error);
if (unescaped != NULL)
{
- _dbus_warn ("Should not have successfully unescaped '%s' to '%s'\n",
+ _dbus_warn ("Should not have successfully unescaped '%s' to '%s'",
invalid_escaped_values[i], unescaped);
dbus_free (unescaped);
exit (1);
a = '\\';
else
{
- _dbus_warn ("bad backslashed byte %c\n", b);
+ _dbus_warn ("bad backslashed byte %c", b);
return FALSE;
}
}
if (!_dbus_file_get_contents (&file, filename, &error)) {
- _dbus_warn ("Getting contents of %s failed: %s\n",
+ _dbus_warn ("Getting contents of %s failed: %s",
_dbus_string_get_const_data (filename), error.message);
dbus_error_free (&error);
goto out;
{
line_no += 1;
- /* _dbus_warn ("%s\n", _dbus_string_get_const_data (&line)); */
+ /* _dbus_warn ("%s", _dbus_string_get_const_data (&line)); */
_dbus_string_delete_leading_blanks (&line);
if (auth != NULL)
{
- _dbus_warn ("already created a DBusAuth (CLIENT or SERVER given twice)\n");
+ _dbus_warn ("already created a DBusAuth (CLIENT or SERVER given twice)");
goto out;
}
auth = _dbus_auth_client_new ();
if (auth == NULL)
{
- _dbus_warn ("no memory to create DBusAuth\n");
+ _dbus_warn ("no memory to create DBusAuth");
goto out;
}
creds = _dbus_credentials_new_from_current_process ();
if (creds == NULL)
{
- _dbus_warn ("no memory for credentials\n");
+ _dbus_warn ("no memory for credentials");
_dbus_auth_unref (auth);
auth = NULL;
goto out;
if (!_dbus_auth_set_credentials (auth, creds))
{
- _dbus_warn ("no memory for setting credentials\n");
+ _dbus_warn ("no memory for setting credentials");
_dbus_auth_unref (auth);
auth = NULL;
_dbus_credentials_unref (creds);
if (auth != NULL)
{
- _dbus_warn ("already created a DBusAuth (CLIENT or SERVER given twice)\n");
+ _dbus_warn ("already created a DBusAuth (CLIENT or SERVER given twice)");
goto out;
}
auth = _dbus_auth_server_new (&guid);
if (auth == NULL)
{
- _dbus_warn ("no memory to create DBusAuth\n");
+ _dbus_warn ("no memory to create DBusAuth");
goto out;
}
creds = _dbus_credentials_new_from_current_process ();
if (creds == NULL)
{
- _dbus_warn ("no memory for credentials\n");
+ _dbus_warn ("no memory for credentials");
_dbus_auth_unref (auth);
auth = NULL;
goto out;
if (!_dbus_auth_set_credentials (auth, creds))
{
- _dbus_warn ("no memory for setting credentials\n");
+ _dbus_warn ("no memory for setting credentials");
_dbus_auth_unref (auth);
auth = NULL;
_dbus_credentials_unref (creds);
}
else if (auth == NULL)
{
- _dbus_warn ("must specify CLIENT or SERVER\n");
+ _dbus_warn ("must specify CLIENT or SERVER");
goto out;
}
if (!_dbus_string_init (&to_send))
{
- _dbus_warn ("no memory to allocate string\n");
+ _dbus_warn ("no memory to allocate string");
goto out;
}
if (!append_quoted_string (&to_send, &line))
{
- _dbus_warn ("failed to append quoted string line %d\n",
+ _dbus_warn ("failed to append quoted string line %d",
line_no);
_dbus_string_free (&to_send);
goto out;
if (!_dbus_string_append (&to_send, "\r\n"))
{
- _dbus_warn ("failed to append \r\n from line %d\n",
+ _dbus_warn ("failed to append \\r\\n from line %d",
line_no);
_dbus_string_free (&to_send);
goto out;
if (!_dbus_string_init (&username))
{
- _dbus_warn ("no memory for userid\n");
+ _dbus_warn ("no memory for userid");
_dbus_string_free (&to_send);
goto out;
}
if (!_dbus_append_user_from_current_process (&username))
{
- _dbus_warn ("no memory for userid\n");
+ _dbus_warn ("no memory for userid");
_dbus_string_free (&username);
_dbus_string_free (&to_send);
goto out;
if (!_dbus_string_hex_encode (&username, 0,
&to_send, where))
{
- _dbus_warn ("no memory to subst USERID_HEX\n");
+ _dbus_warn ("no memory to subst USERID_HEX");
_dbus_string_free (&username);
_dbus_string_free (&to_send);
goto out;
if (!_dbus_string_init (&username))
{
- _dbus_warn ("no memory for username\n");
+ _dbus_warn ("no memory for username");
_dbus_string_free (&to_send);
goto out;
}
if (!_dbus_append_user_from_current_process (&username))
{
- _dbus_warn ("no memory for username\n");
+ _dbus_warn ("no memory for username");
_dbus_string_free (&username);
_dbus_string_free (&to_send);
goto out;
if (!_dbus_string_hex_encode (&username, 0,
&to_send, where))
{
- _dbus_warn ("no memory to subst USERNAME_HEX\n");
+ _dbus_warn ("no memory to subst USERNAME_HEX");
_dbus_string_free (&username);
_dbus_string_free (&to_send);
goto out;
if (!_dbus_string_copy (&to_send, 0,
buffer, _dbus_string_get_length (buffer)))
{
- _dbus_warn ("not enough memory to call bytes_received, or can't add bytes to auth object already in end state\n");
+ _dbus_warn ("not enough memory to call bytes_received, or can't add bytes to auth object already in end state");
_dbus_string_free (&to_send);
_dbus_auth_return_buffer (auth, buffer);
goto out;
expected = auth_state_from_string (&line);
if (expected < 0)
{
- _dbus_warn ("bad auth state given to EXPECT_STATE\n");
+ _dbus_warn ("bad auth state given to EXPECT_STATE");
goto parse_failed;
}
if (expected != state)
{
- _dbus_warn ("expected auth state %s but got %s on line %d\n",
+ _dbus_warn ("expected auth state %s but got %s on line %d",
auth_state_to_string (expected),
auth_state_to_string (state),
line_no);
if (!_dbus_string_init (&received))
{
- _dbus_warn ("no mem to allocate string received\n");
+ _dbus_warn ("no mem to allocate string received");
goto out;
}
if (!_dbus_string_pop_line (&from_auth, &received))
{
- _dbus_warn ("no line popped from the DBusAuth being tested, expected command %s on line %d\n",
+ _dbus_warn ("no line popped from the DBusAuth being tested, expected command %s on line %d",
_dbus_string_get_const_data (&line), line_no);
_dbus_string_free (&received);
goto out;
if (!same_first_word (&received, &line))
{
- _dbus_warn ("line %d expected command '%s' and got '%s'\n",
+ _dbus_warn ("line %d expected command '%s' and got '%s'",
line_no,
_dbus_string_get_const_data (&line),
_dbus_string_get_const_data (&received));
if (!_dbus_string_init (&expected))
{
- _dbus_warn ("no mem to allocate string expected\n");
+ _dbus_warn ("no mem to allocate string expected");
goto out;
}
if (!append_quoted_string (&expected, &line))
{
- _dbus_warn ("failed to append quoted string line %d\n",
+ _dbus_warn ("failed to append quoted string line %d",
line_no);
_dbus_string_free (&expected);
goto out;
}
else
{
- _dbus_warn ("Expected unused bytes '%s' and have '%s'\n",
+ _dbus_warn ("Expected unused bytes '%s' and have '%s'",
_dbus_string_get_const_data (&expected),
_dbus_string_get_const_data (unused));
_dbus_string_free (&expected);
authorized_identity = _dbus_auth_get_identity (auth);
if (!_dbus_credentials_are_anonymous (authorized_identity))
{
- _dbus_warn ("Expected anonymous login or failed login, but some credentials were authorized\n");
+ _dbus_warn ("Expected anonymous login or failed login, but some credentials were authorized");
goto out;
}
}
authorized_identity = _dbus_auth_get_identity (auth);
if (_dbus_credentials_are_anonymous (authorized_identity))
{
- _dbus_warn ("Expected to have some credentials, but we don't\n");
+ _dbus_warn ("Expected to have some credentials, but we don't");
goto out;
}
}
if (!_dbus_string_init (&expected))
{
- _dbus_warn ("no mem to allocate string expected\n");
+ _dbus_warn ("no mem to allocate string expected");
goto out;
}
if (!append_quoted_string (&expected, &line))
{
- _dbus_warn ("failed to append quoted string line %d\n",
+ _dbus_warn ("failed to append quoted string line %d",
line_no);
_dbus_string_free (&expected);
goto out;
}
else
{
- _dbus_warn ("Expected exact string '%s' and have '%s'\n",
+ _dbus_warn ("Expected exact string '%s' and have '%s'",
_dbus_string_get_const_data (&expected),
_dbus_string_get_const_data (&from_auth));
_dbus_string_free (&expected);
parse_failed:
{
- _dbus_warn ("couldn't process line %d \"%s\"\n",
+ _dbus_warn ("couldn't process line %d \"%s\"",
line_no, _dbus_string_get_const_data (&line));
goto out;
}
if (auth == NULL)
{
- _dbus_warn ("Auth script is bogus, did not even have CLIENT or SERVER\n");
+ _dbus_warn ("Auth script is bogus, did not even have CLIENT or SERVER");
goto out;
}
else if (state == DBUS_AUTH_STATE_AUTHENTICATED)
if (_dbus_string_get_length (unused) > 0)
{
- _dbus_warn ("did not expect unused bytes (scripts must specify explicitly if they are expected)\n");
+ _dbus_warn ("did not expect unused bytes (scripts must specify explicitly if they are expected)");
goto out;
}
}
if (_dbus_string_get_length (&from_auth) > 0)
{
- _dbus_warn ("script did not have EXPECT_ statements for all the data received from the DBusAuth\n");
- _dbus_warn ("Leftover data: %s\n", _dbus_string_get_const_data (&from_auth));
+ _dbus_warn ("script did not have EXPECT_ statements for all the data received from the DBusAuth");
+ _dbus_warn ("Leftover data: %s", _dbus_string_get_const_data (&from_auth));
goto out;
}
dir = _dbus_directory_open (&test_directory, &error);
if (dir == NULL)
{
- _dbus_warn ("Could not open %s: %s\n",
+ _dbus_warn ("Could not open %s: %s",
_dbus_string_get_const_data (&test_directory),
error.message);
dbus_error_free (&error);
if (dbus_error_is_set (&error))
{
- _dbus_warn ("Could not get next file in %s: %s\n",
+ _dbus_warn ("Could not get next file in %s: %s",
_dbus_string_get_const_data (&test_directory), error.message);
dbus_error_free (&error);
goto failed;
while (i < N_BUS_TYPES)
{
if (bus_connections[i] != NULL)
- _dbus_warn_check_failed ("dbus_shutdown() called but connections were still live. This probably means the application did not drop all its references to bus connections.\n");
+ _dbus_warn_check_failed ("dbus_shutdown() called but connections were still live. This probably means the application did not drop all its references to bus connections.");
dbus_free (bus_connection_addresses[i]);
bus_connection_addresses[i] = NULL;
else if (supported && !retval)
{
if (dbus_error_is_set(&error))
- _dbus_warn ("Dynamic session lookup supported but failed: %s\n", error.message);
+ _dbus_warn ("Dynamic session lookup supported but failed: %s", error.message);
else
- _dbus_warn ("Dynamic session lookup supported but failed silently\n");
+ _dbus_warn ("Dynamic session lookup supported but failed silently");
}
_dbus_string_free (&addr);
}
{
_dbus_warn_check_failed ("The last reference on a connection was dropped without closing the connection. This is a bug in an application. See dbus_connection_unref() documentation for details.\n%s",
connection->shareable ?
- "Most likely, the application called unref() too many times and removed a reference belonging to libdbus, since this is a shared connection.\n" :
- "Most likely, the application was supposed to call dbus_connection_close(), since this is a private connection.\n");
+ "Most likely, the application called unref() too many times and removed a reference belonging to libdbus, since this is a shared connection." :
+ "Most likely, the application was supposed to call dbus_connection_close(), since this is a private connection.");
return;
}
#endif
{
CONNECTION_UNLOCK (connection);
- _dbus_warn_check_failed ("Applications must not close shared connections - see dbus_connection_close() docs. This is a bug in the application.\n");
+ _dbus_warn_check_failed ("Applications must not close shared connections - see dbus_connection_close() docs. This is a bug in the application.");
return;
}
#endif
#ifndef DBUS_DISABLE_CHECKS
if (filter == NULL)
{
- _dbus_warn_check_failed ("Attempt to remove filter function %p user data %p, but no such filter has been added\n",
+ _dbus_warn_check_failed ("Attempt to remove filter function %p user data %p, but no such filter has been added",
function, user_data);
return;
}
if (dbus_error_has_name (&error, DBUS_ERROR_OBJECT_PATH_IN_USE))
{
- _dbus_warn ("%s\n", error.message);
+ _dbus_warn ("%s", error.message);
dbus_error_free (&error);
return FALSE;
}
if (dbus_error_has_name (&error, DBUS_ERROR_OBJECT_PATH_IN_USE))
{
- _dbus_warn ("%s\n", error.message);
+ _dbus_warn ("%s", error.message);
dbus_error_free (&error);
return FALSE;
}
if (!_dbus_delete_file (&keyring->filename_lock, &error))
{
- _dbus_warn ("Failed to delete lock file: %s\n",
+ _dbus_warn ("Failed to delete lock file: %s",
error.message);
dbus_error_free (&error);
}
if (!_dbus_string_validate_ascii (&contents, 0,
_dbus_string_get_length (&contents)))
{
- _dbus_warn ("Secret keyring file contains non-ASCII! Ignoring existing contents\n");
+ _dbus_warn ("Secret keyring file contains non-ASCII! Ignoring existing contents");
_dbus_string_set_length (&contents, 0);
}
{
if (error && error->name)
_dbus_verbose ("error is %s: %s\n", error->name, error->message);
- _dbus_warn ("returning %d but error pointer %p name %s\n",
+ _dbus_warn ("returning %d but error pointer %p name %s",
retval, error, error->name ? error->name : "(none)");
_dbus_assert_not_reached ("didn't handle errors properly");
}
DBusList *link;
DBusList **watches;
- _dbus_warn ("invalid request, socket fd %" DBUS_POLLABLE_FORMAT " not open\n",
+ _dbus_warn ("invalid request, socket fd %" DBUS_POLLABLE_FORMAT " not open",
_dbus_pollable_printable (fd));
watches = _dbus_hash_table_lookup_pollable (loop->watches, fd);
}
}
- _dbus_warn ("could not find watch %p to remove\n", watch);
+ _dbus_warn ("could not find watch %p to remove", watch);
}
dbus_bool_t
link = next;
}
- _dbus_warn ("could not find timeout %p to remove\n", timeout);
+ _dbus_warn ("could not find timeout %p to remove", timeout);
}
/* Convolutions from GLib, there really must be a better way
}
break;
default:
- _dbus_warn_check_failed ("type %s %d not a basic type\n",
+ _dbus_warn_check_failed ("type %s %d not a basic type",
_dbus_type_to_string (type), type);
_dbus_assert_not_reached ("not a basic type");
break;
_dbus_assert (byte_order == DBUS_LITTLE_ENDIAN || byte_order == DBUS_BIG_ENDIAN);
if (insert_at > _dbus_string_get_length (str))
- _dbus_warn ("insert_at = %d string len = %d data_len = %d\n",
+ _dbus_warn ("insert_at = %d string len = %d data_len = %d",
insert_at, _dbus_string_get_length (str), data_len);
if (marshal_as == MARSHAL_AS_BYTE_ARRAY)
}
break;
default:
- _dbus_warn ("type %s not a basic type\n",
+ _dbus_warn ("type %s not a basic type",
_dbus_type_to_string (type));
_dbus_assert_not_reached ("not a basic type");
break;
{ \
_dbus_verbose_bytes_of_string (&str, dump_pos, \
_dbus_string_get_length (&str) - dump_pos); \
- _dbus_warn ("literal '%s'\nvalue '%s'\n", literal, v_##typename); \
+ _dbus_warn ("literal '%s'\nvalue '%s'", literal, v_##typename); \
_dbus_assert_not_reached ("demarshaled wrong value"); \
} \
} while (0)
_dbus_verbose_bytes_of_string (©, 0,
_dbus_string_get_length (©));
- _dbus_warn ("Byte-swapped data did not have same values as original data\n");
+ _dbus_warn ("Byte-swapped data did not have same values as original data");
_dbus_assert_not_reached ("test failed");
}
if (t != expected)
{
- _dbus_warn ("Read type %s while expecting %s at %s line %d\n",
+ _dbus_warn ("Read type %s while expecting %s at %s line %d",
_dbus_type_to_string (t),
_dbus_type_to_string (expected),
funcname, line);
#define NEXT_EXPECTING_TRUE(reader) do { if (!_dbus_type_reader_next (reader)) \
{ \
- _dbus_warn ("_dbus_type_reader_next() should have returned TRUE at %s %d\n", \
+ _dbus_warn ("_dbus_type_reader_next() should have returned TRUE at %s %d", \
_DBUS_FUNCTION_NAME, __LINE__); \
_dbus_assert_not_reached ("test failed"); \
} \
#define NEXT_EXPECTING_FALSE(reader) do { if (_dbus_type_reader_next (reader)) \
{ \
- _dbus_warn ("_dbus_type_reader_next() should have returned FALSE at %s %d\n", \
+ _dbus_warn ("_dbus_type_reader_next() should have returned FALSE at %s %d", \
_DBUS_FUNCTION_NAME, __LINE__); \
_dbus_assert_not_reached ("test failed"); \
} \
while (elem > 0)
{
if (!_dbus_type_reader_next (&array))
- _dbus_assert_not_reached ("should have had another element\n");
+ _dbus_assert_not_reached ("should have had another element");
--elem;
}
if (!_dbus_string_equal_substring (nid->signature, 0, _dbus_string_get_length (nid->signature),
&nid->block->signature, nid->type_offset))
{
- _dbus_warn ("Expected signature '%s' and got '%s' with initial offset %d\n",
+ _dbus_warn ("Expected signature '%s' and got '%s' with initial offset %d",
_dbus_string_get_const_data (nid->signature),
_dbus_string_get_const_data_len (&nid->block->signature, nid->type_offset, 0),
nid->type_offset);
&n_elements);
if (n_elements != count)
- _dbus_warn ("got %d elements expected %d\n", n_elements, count);
+ _dbus_warn ("got %d elements expected %d", n_elements, count);
_dbus_assert (n_elements == count);
for (i = 0; i < count; i++)
&n_elements);
if (n_elements != count)
- _dbus_warn ("got %d elements expected %d\n", n_elements, count);
+ _dbus_warn ("got %d elements expected %d", n_elements, count);
_dbus_assert (n_elements == count);
for (i = 0; i < count; i++)
if (strcmp (buf, v) != 0)
{
- _dbus_warn ("read string '%s' expected '%s'\n",
+ _dbus_warn ("read string '%s' expected '%s'",
v, buf);
_dbus_assert_not_reached ("test failed");
}
if (!_DBUS_DOUBLES_BITWISE_EQUAL (v, expected))
{
- _dbus_warn ("Expected double %g got %g\n bits = 0x%" PRIx64 " vs.\n bits = 0x%" PRIx64 ")\n",
+ _dbus_warn ("Expected double %g got %g\n bits = 0x%" PRIx64 " vs.\n bits = 0x%" PRIx64 ")",
expected, v,
*(dbus_uint64_t*)(char*)&expected,
*(dbus_uint64_t*)(char*)&v);
if (strcmp (buf, v) != 0)
{
- _dbus_warn ("read object path '%s' expected '%s'\n",
+ _dbus_warn ("read object path '%s' expected '%s'",
v, buf);
_dbus_assert_not_reached ("test failed");
}
if (strcmp (buf, v) != 0)
{
- _dbus_warn ("read signature value '%s' expected '%s'\n",
+ _dbus_warn ("read signature value '%s' expected '%s'",
v, buf);
_dbus_assert_not_reached ("test failed");
}
_dbus_verbose ("recursing into type %s\n", _dbus_type_to_string (t));
#ifndef DBUS_DISABLE_CHECKS
if (t == DBUS_TYPE_INVALID)
- _dbus_warn_check_failed ("You can't recurse into an empty array or off the end of a message body\n");
+ _dbus_warn_check_failed ("You can't recurse into an empty array or off the end of a message body");
#endif /* DBUS_DISABLE_CHECKS */
_dbus_assert_not_reached ("don't yet handle recursing into this type");
{
if (expected != DBUS_TYPE_INVALID)
_dbus_warn_check_failed ("Writing an element of type %s, but the expected type here is %s\n"
- "The overall signature expected here was '%s' and we are on byte %d of that signature.\n",
+ "The overall signature expected here was '%s' and we are on byte %d of that signature.",
_dbus_type_to_string (sub->container_type),
_dbus_type_to_string (expected),
_dbus_string_get_const_data (writer->type_str), writer->type_pos);
else
_dbus_warn_check_failed ("Writing an element of type %s, but no value is expected here\n"
- "The overall signature expected here was '%s' and we are on byte %d of that signature.\n",
+ "The overall signature expected here was '%s' and we are on byte %d of that signature.",
_dbus_type_to_string (sub->container_type),
_dbus_string_get_const_data (writer->type_str), writer->type_pos);
{
if (expected != DBUS_TYPE_INVALID)
_dbus_warn_check_failed ("Array or variant type requires that type %s be written, but %s was written.\n"
- "The overall signature expected here was '%s' and we are on byte %d of that signature.\n",
+ "The overall signature expected here was '%s' and we are on byte %d of that signature.",
_dbus_type_to_string (expected), _dbus_type_to_string (typecode),
_dbus_string_get_const_data (writer->type_str), writer->type_pos);
else
_dbus_warn_check_failed ("Array or variant type wasn't expecting any more values to be written into it, but a value %s was written.\n"
- "The overall signature expected here was '%s' and we are on byte %d of that signature.\n",
+ "The overall signature expected here was '%s' and we are on byte %d of that signature.",
_dbus_type_to_string (typecode),
_dbus_string_get_const_data (writer->type_str), writer->type_pos);
_dbus_assert_not_reached ("bad type inserted somewhere inside an array or variant");
writer->type_str,
writer->u.array.element_type_pos + 1))
{
- _dbus_warn_check_failed ("Writing an array of '%s' but this is incompatible with the expected type of elements in the parent array\n",
+ _dbus_warn_check_failed ("Writing an array of '%s' but this is incompatible with the expected type of elements in the parent array",
_dbus_string_get_const_data_len (contained_type,
contained_type_start,
contained_type_len));
if (v != tests[i].expected)
{
- _dbus_warn ("Improper validation result %d for '%s'\n",
+ _dbus_warn ("Improper validation result %d for '%s'",
v, tests[i].data);
_dbus_assert_not_reached ("test failed");
}
if (!_dbus_validate_path (&str, 0,
_dbus_string_get_length (&str)))
{
- _dbus_warn ("Path \"%s\" should have been valid\n", valid_paths[i]);
+ _dbus_warn ("Path \"%s\" should have been valid", valid_paths[i]);
_dbus_assert_not_reached ("invalid path");
}
if (_dbus_validate_path (&str, 0,
_dbus_string_get_length (&str)))
{
- _dbus_warn ("Path \"%s\" should have been invalid\n", invalid_paths[i]);
+ _dbus_warn ("Path \"%s\" should have been invalid", invalid_paths[i]);
_dbus_assert_not_reached ("valid path");
}
if (!_dbus_validate_interface (&str, 0,
_dbus_string_get_length (&str)))
{
- _dbus_warn ("Interface \"%s\" should have been valid\n", valid_interfaces[i]);
+ _dbus_warn ("Interface \"%s\" should have been valid", valid_interfaces[i]);
_dbus_assert_not_reached ("invalid interface");
}
if (_dbus_validate_interface (&str, 0,
_dbus_string_get_length (&str)))
{
- _dbus_warn ("Interface \"%s\" should have been invalid\n", invalid_interfaces[i]);
+ _dbus_warn ("Interface \"%s\" should have been invalid", invalid_interfaces[i]);
_dbus_assert_not_reached ("valid interface");
}
if (!_dbus_validate_bus_name (&str, 0,
_dbus_string_get_length (&str)))
{
- _dbus_warn ("Bus name \"%s\" should have been valid\n", valid_interfaces[i]);
+ _dbus_warn ("Bus name \"%s\" should have been valid", valid_interfaces[i]);
_dbus_assert_not_reached ("invalid bus name");
}
if (_dbus_validate_bus_name (&str, 0,
_dbus_string_get_length (&str)))
{
- _dbus_warn ("Bus name \"%s\" should have been invalid\n", invalid_interfaces[i]);
+ _dbus_warn ("Bus name \"%s\" should have been invalid", invalid_interfaces[i]);
_dbus_assert_not_reached ("valid bus name");
}
}
if (!_dbus_validate_bus_name (&str, 0,
_dbus_string_get_length (&str)))
{
- _dbus_warn ("Bus name \"%s\" should have been valid\n", valid_unique_names[i]);
+ _dbus_warn ("Bus name \"%s\" should have been valid", valid_unique_names[i]);
_dbus_assert_not_reached ("invalid unique name");
}
if (_dbus_validate_bus_name (&str, 0,
_dbus_string_get_length (&str)))
{
- _dbus_warn ("Bus name \"%s\" should have been invalid\n", invalid_unique_names[i]);
+ _dbus_warn ("Bus name \"%s\" should have been invalid", invalid_unique_names[i]);
_dbus_assert_not_reached ("valid unique name");
}
if (!_dbus_validate_error_name (&str, 0,
_dbus_string_get_length (&str)))
{
- _dbus_warn ("Error name \"%s\" should have been valid\n", valid_interfaces[i]);
+ _dbus_warn ("Error name \"%s\" should have been valid", valid_interfaces[i]);
_dbus_assert_not_reached ("invalid error name");
}
if (_dbus_validate_error_name (&str, 0,
_dbus_string_get_length (&str)))
{
- _dbus_warn ("Error name \"%s\" should have been invalid\n", invalid_interfaces[i]);
+ _dbus_warn ("Error name \"%s\" should have been invalid", invalid_interfaces[i]);
_dbus_assert_not_reached ("valid error name");
}
}
if (!_dbus_validate_member (&str, 0,
_dbus_string_get_length (&str)))
{
- _dbus_warn ("Member \"%s\" should have been valid\n", valid_members[i]);
+ _dbus_warn ("Member \"%s\" should have been valid", valid_members[i]);
_dbus_assert_not_reached ("invalid member");
}
if (_dbus_validate_member (&str, 0,
_dbus_string_get_length (&str)))
{
- _dbus_warn ("Member \"%s\" should have been invalid\n", invalid_members[i]);
+ _dbus_warn ("Member \"%s\" should have been invalid", invalid_members[i]);
_dbus_assert_not_reached ("valid member");
}
if (!_dbus_validate_signature (&str, 0,
_dbus_string_get_length (&str)))
{
- _dbus_warn ("Signature \"%s\" should have been valid\n", valid_signatures[i]);
+ _dbus_warn ("Signature \"%s\" should have been valid", valid_signatures[i]);
_dbus_assert_not_reached ("invalid signature");
}
if (_dbus_validate_signature (&str, 0,
_dbus_string_get_length (&str)))
{
- _dbus_warn ("Signature \"%s\" should have been invalid\n", invalid_signatures[i]);
+ _dbus_warn ("Signature \"%s\" should have been invalid", invalid_signatures[i]);
_dbus_assert_not_reached ("valid signature");
}
_dbus_string_get_length (&body));
if (validity != DBUS_VALID)
{
- _dbus_warn ("invalid code %d expected valid on sequence %d little endian\n",
+ _dbus_warn ("invalid code %d expected valid on sequence %d little endian",
validity, sequence);
_dbus_verbose_bytes_of_string (&signature, 0, _dbus_string_get_length (&signature));
_dbus_verbose_bytes_of_string (&body, 0, _dbus_string_get_length (&body));
_dbus_string_get_length (&body));
if (validity != DBUS_VALID)
{
- _dbus_warn ("invalid code %d expected valid on sequence %d big endian\n",
+ _dbus_warn ("invalid code %d expected valid on sequence %d big endian",
validity, sequence);
_dbus_verbose_bytes_of_string (&signature, 0, _dbus_string_get_length (&signature));
_dbus_verbose_bytes_of_string (&body, 0, _dbus_string_get_length (&body));
dbus_uint32_t value = *(dbus_uint32_t*) &block[i];
if (value != GUARD_VALUE)
{
- _dbus_warn ("Block of %lu bytes from %s had start guard value 0x%ux at %d expected 0x%x\n",
+ _dbus_warn ("Block of %lu bytes from %s had start guard value 0x%ux at %d expected 0x%x",
(long) requested_bytes, source_string (source),
value, i, GUARD_VALUE);
failed = TRUE;
dbus_uint32_t value = *(dbus_uint32_t*) &block[i];
if (value != GUARD_VALUE)
{
- _dbus_warn ("Block of %lu bytes from %s had end guard value 0x%ux at %d expected 0x%x\n",
+ _dbus_warn ("Block of %lu bytes from %s had end guard value 0x%ux at %d expected 0x%x",
(long) requested_bytes, source_string (source),
value, i, GUARD_VALUE);
failed = TRUE;
}
else if (malloc_cannot_fail)
{
- _dbus_warn ("out of memory: malloc (%ld + %ld)\n",
+ _dbus_warn ("out of memory: malloc (%ld + %ld)",
(long) bytes, (long) GUARD_EXTRA_SIZE);
_dbus_abort ();
}
}
else if (malloc_cannot_fail)
{
- _dbus_warn ("out of memory: malloc (%ld)\n", (long) bytes);
+ _dbus_warn ("out of memory: malloc (%ld)", (long) bytes);
_dbus_abort ();
}
#endif
}
else if (malloc_cannot_fail)
{
- _dbus_warn ("out of memory: calloc (%ld + %ld, 1)\n",
+ _dbus_warn ("out of memory: calloc (%ld + %ld, 1)",
(long) bytes, (long) GUARD_EXTRA_SIZE);
_dbus_abort ();
}
}
else if (malloc_cannot_fail)
{
- _dbus_warn ("out of memory: calloc (%ld)\n", (long) bytes);
+ _dbus_warn ("out of memory: calloc (%ld)", (long) bytes);
_dbus_abort ();
}
#endif
{
if (malloc_cannot_fail)
{
- _dbus_warn ("out of memory: realloc (%p, %ld + %ld)\n",
+ _dbus_warn ("out of memory: realloc (%p, %ld + %ld)",
memory, (long) bytes, (long) GUARD_EXTRA_SIZE);
_dbus_abort ();
}
}
else if (malloc_cannot_fail)
{
- _dbus_warn ("out of memory: malloc (%ld + %ld)\n",
+ _dbus_warn ("out of memory: malloc (%ld + %ld)",
(long) bytes, (long) GUARD_EXTRA_SIZE);
_dbus_abort ();
}
#ifdef DBUS_ENABLE_EMBEDDED_TESTS
if (mem == NULL && malloc_cannot_fail)
{
- _dbus_warn ("out of memory: malloc (%ld)\n", (long) bytes);
+ _dbus_warn ("out of memory: malloc (%ld)", (long) bytes);
_dbus_abort ();
}
if (_dbus_get_malloc_blocks_outstanding () != 0)
{
- _dbus_warn ("%d dbus_malloc blocks were not freed in %s\n",
+ _dbus_warn ("%d dbus_malloc blocks were not freed in %s",
_dbus_get_malloc_blocks_outstanding (), __FILE__);
_dbus_assert_not_reached ("memleaks");
}
if (FD_ISSET (fd, &fds->set))
continue;
- _dbus_warn ("file descriptor %i leaked in %s.\n", fd, __FILE__);
+ _dbus_warn ("file descriptor %i leaked in %s.", fd, __FILE__);
_dbus_assert_not_reached ("fdleaks");
}
if (_dbus_message_loader_get_is_corrupted (loader))
{
- _dbus_warn ("loader corrupted on message that was expected to be valid; invalid reason %d\n",
+ _dbus_warn ("loader corrupted on message that was expected to be valid; invalid reason %d",
loader->corruption_reason);
goto failed;
}
message = _dbus_message_loader_pop_message (loader);
if (message == NULL)
{
- _dbus_warn ("didn't load message that was expected to be valid (message not popped)\n");
+ _dbus_warn ("didn't load message that was expected to be valid (message not popped)");
goto failed;
}
if (_dbus_string_get_length (&loader->data) > 0)
{
- _dbus_warn ("had leftover bytes from expected-to-be-valid single message\n");
+ _dbus_warn ("had leftover bytes from expected-to-be-valid single message");
goto failed;
}
if (!_dbus_message_loader_get_is_corrupted (loader))
{
- _dbus_warn ("loader not corrupted on message that was expected to be invalid\n");
+ _dbus_warn ("loader not corrupted on message that was expected to be invalid");
goto failed;
}
if (expected_validity != DBUS_INVALID_FOR_UNKNOWN_REASON &&
loader->corruption_reason != expected_validity)
{
- _dbus_warn ("expected message to be corrupted for reason %d and was corrupted for %d instead\n",
+ _dbus_warn ("expected message to be corrupted for reason %d and was corrupted for %d instead",
expected_validity, loader->corruption_reason);
goto failed;
}
if (_dbus_message_loader_get_is_corrupted (loader))
{
- _dbus_warn ("loader corrupted on message that was expected to be valid (but incomplete), corruption reason %d\n",
+ _dbus_warn ("loader corrupted on message that was expected to be valid (but incomplete), corruption reason %d",
loader->corruption_reason);
goto failed;
}
message = _dbus_message_loader_pop_message (loader);
if (message != NULL)
{
- _dbus_warn ("loaded message that was expected to be incomplete\n");
+ _dbus_warn ("loaded message that was expected to be incomplete");
goto failed;
}
_dbus_verbose ("Loading raw %s\n", _dbus_string_get_const_data (filename));
if (!_dbus_file_get_contents (data, filename, &error))
{
- _dbus_warn ("Could not load message file %s: %s\n",
+ _dbus_warn ("Could not load message file %s: %s",
_dbus_string_get_const_data (filename),
error.message);
dbus_error_free (&error);
retval = FALSE;
if (!_dbus_string_init (&data))
- _dbus_assert_not_reached ("could not allocate string\n");
+ _dbus_assert_not_reached ("could not allocate string");
if (!dbus_internal_do_not_use_load_message_file (filename, &data))
goto failed;
_dbus_verbose_bytes_of_string (&data, 0,
_dbus_string_get_length (&data));
- _dbus_warn ("Failed message loader test on %s\n",
+ _dbus_warn ("Failed message loader test on %s",
_dbus_string_get_const_data (filename));
}
dir = _dbus_directory_open (&test_directory, &error);
if (dir == NULL)
{
- _dbus_warn ("Could not open %s: %s\n",
+ _dbus_warn ("Could not open %s: %s",
_dbus_string_get_const_data (&test_directory),
error.message);
dbus_error_free (&error);
if (dbus_error_is_set (&error))
{
- _dbus_warn ("Could not get next file in %s: %s\n",
+ _dbus_warn ("Could not get next file in %s: %s",
_dbus_string_get_const_data (&test_directory),
error.message);
dbus_error_free (&error);
&our_string_array, &our_string_array_len,
0))
{
- _dbus_warn ("error: %s - %s\n", error.name,
+ _dbus_warn ("error: %s - %s", error.name,
(error.message != NULL) ? error.message : "no message");
_dbus_assert_not_reached ("Could not get arguments");
}
if (!dbus_message_iter_get_args (&iter, &error,
DBUS_TYPE_INVALID))
{
- _dbus_warn ("error: %s - %s\n", error.name,
+ _dbus_warn ("error: %s - %s", error.name,
(error.message != NULL) ? error.message : "no message");
}
else
DBUS_TYPE_UINT32, &our_uint,
DBUS_TYPE_INVALID))
{
- _dbus_warn ("error: %s - %s\n", error.name,
+ _dbus_warn ("error: %s - %s", error.name,
(error.message != NULL) ? error.message : "no message");
}
else
}
else
{
- _dbus_warn ("error: parse with wrong signature: 'uashuu'.\n");
+ _dbus_warn ("error: parse with wrong signature: 'uashuu'.");
}
/* parse with wrong signature: "uashuashu" */
}
else
{
- _dbus_warn ("error: parse with wrong signature: 'uashuashu'.\n");
+ _dbus_warn ("error: parse with wrong signature: 'uashuashu'.");
}
/* parse with correct signature: "uashuash" */
#endif
DBUS_TYPE_INVALID))
{
- _dbus_warn ("error: %s - %s\n", error.name,
+ _dbus_warn ("error: %s - %s", error.name,
(error.message != NULL) ? error.message : "no message");
_dbus_assert_not_reached ("Could not get arguments");
}
if (!dbus_internal_do_not_use_try_message_data (&mdata.data,
mdata.expected_validity))
{
- _dbus_warn ("expected validity %d and did not get it\n",
+ _dbus_warn ("expected validity %d and did not get it",
mdata.expected_validity);
_dbus_assert_not_reached ("message data failed");
}
{
if (!_dbus_close(fds[i], &e))
{
- _dbus_warn("Failed to close file descriptor: %s\n", e.message);
+ _dbus_warn("Failed to close file descriptor: %s", e.message);
dbus_error_free(&e);
}
}
if (iter == NULL)
{
- _dbus_warn_check_failed ("dbus message iterator is NULL\n");
+ _dbus_warn_check_failed ("dbus message iterator is NULL");
return FALSE;
}
{
if (iter->u.reader.byte_order != byte_order)
{
- _dbus_warn_check_failed ("dbus message changed byte order since iterator was created\n");
+ _dbus_warn_check_failed ("dbus message changed byte order since iterator was created");
return FALSE;
}
/* because we swap the message into compiler order when you init an iter */
{
if (iter->u.writer.byte_order != byte_order)
{
- _dbus_warn_check_failed ("dbus message changed byte order since append iterator was created\n");
+ _dbus_warn_check_failed ("dbus message changed byte order since append iterator was created");
return FALSE;
}
/* because we swap the message into compiler order when you init an iter */
}
else
{
- _dbus_warn_check_failed ("dbus message iterator looks uninitialized or corrupted\n");
+ _dbus_warn_check_failed ("dbus message iterator looks uninitialized or corrupted");
return FALSE;
}
if (iter->changed_stamp != iter->message->changed_stamp)
{
- _dbus_warn_check_failed ("dbus message iterator invalid because the message has been modified (or perhaps the iterator is just uninitialized)\n");
+ _dbus_warn_check_failed ("dbus message iterator invalid because the message has been modified (or perhaps the iterator is just uninitialized)");
return FALSE;
}
#ifndef DBUS_DISABLE_CHECKS
else
{
- _dbus_warn ("you can't read arrays of container types (struct, variant, array) with %s for now\n",
+ _dbus_warn ("you can't read arrays of container types (struct, variant, array) with %s for now",
_DBUS_FUNCTION_NAME);
goto out;
}
#ifndef DBUS_DISABLE_CHECKS
else
{
- _dbus_warn ("you can only read arrays and basic types with %s for now\n",
+ _dbus_warn ("you can only read arrays and basic types with %s for now",
_DBUS_FUNCTION_NAME);
goto out;
}
}
else
{
- _dbus_warn ("arrays of %s can't be appended with %s for now\n",
+ _dbus_warn ("arrays of %s can't be appended with %s for now",
_dbus_type_to_string (element_type),
_DBUS_FUNCTION_NAME);
goto failed;
#ifndef DBUS_DISABLE_CHECKS
else
{
- _dbus_warn ("type %s isn't supported yet in %s\n",
+ _dbus_warn ("type %s isn't supported yet in %s",
_dbus_type_to_string (type), _DBUS_FUNCTION_NAME);
goto failed;
}
if (iter->message->locked)
{
- _dbus_warn_check_failed ("dbus append iterator can't be used: message is locked (has already been sent)\n");
+ _dbus_warn_check_failed ("dbus append iterator can't be used: message is locked (has already been sent)");
return FALSE;
}
#ifndef DBUS_DISABLE_CHECKS
if (found_subtree == FALSE)
{
- _dbus_warn ("Attempted to unregister path (path[0] = %s path[1] = %s) which isn't registered\n",
+ _dbus_warn ("Attempted to unregister path (path[0] = %s path[1] = %s) which isn't registered",
path[0] ? path[0] : "null",
(path[0] && path[1]) ? path[1] : "null");
goto unlock;
(const char**) result) != STR_EQUAL)
{
int real_len = _dbus_string_array_length ((const char**)result);
- _dbus_warn ("Expected decompose of %s to have len %d, returned %d, appears to have %d\n",
+ _dbus_warn ("Expected decompose of %s to have len %d, returned %d, appears to have %d",
decompose_tests[i].path, expected_len, result_len,
real_len);
_dbus_warn ("Decompose resulted in elements: { ");
(i + 1) == real_len ? "" : ", ");
++i;
}
- _dbus_warn ("}\n");
+ _dbus_warn ("}");
_dbus_assert_not_reached ("path decompose failed");
}
}
else
{
- _dbus_warn_check_failed ("Re-entrant call to %s\n", _DBUS_FUNCTION_NAME);
+ _dbus_warn_check_failed ("Re-entrant call to %s", _DBUS_FUNCTION_NAME);
result = FALSE;
}
server->watches = watches;
}
else
{
- _dbus_warn_check_failed ("Re-entrant call to %s\n", _DBUS_FUNCTION_NAME);
+ _dbus_warn_check_failed ("Re-entrant call to %s", _DBUS_FUNCTION_NAME);
result = FALSE;
}
server->timeouts = timeouts;
server = dbus_server_listen (valid_addresses[i], &error);
if (server == NULL)
{
- _dbus_warn ("server listen error: %s: %s\n", error.name, error.message);
+ _dbus_warn ("server listen error: %s: %s", error.name, error.message);
dbus_error_free (&error);
_dbus_assert_not_reached ("Failed to listen for valid address.");
}
if (strstr (address, id) == NULL)
{
- _dbus_warn ("server id '%s' is not in the server address '%s'\n",
+ _dbus_warn ("server id '%s' is not in the server address '%s'",
id, address);
_dbus_assert_not_reached ("bad server id or address");
}
if (!_dbus_string_equal (&expected_str, &results))
{
- _dbus_warn ("Expected hash %s got %s for SHA-1 sum\n",
+ _dbus_warn ("Expected hash %s got %s for SHA-1 sum",
expected,
_dbus_string_get_const_data (&results));
_dbus_string_free (&results);
break;
case EBADF:
- _dbus_warn ("Bad fd %d\n", fd);
+ _dbus_warn ("Bad fd %d", fd);
break;
case EEXIST:
- _dbus_warn ("fd %d added and then added again\n", fd);
+ _dbus_warn ("fd %d added and then added again", fd);
break;
default:
- _dbus_warn ("Misc error when trying to watch fd %d: %s\n", fd,
+ _dbus_warn ("Misc error when trying to watch fd %d: %s", fd,
strerror (err));
break;
}
switch (err)
{
case EBADF:
- _dbus_warn ("Bad fd %d\n", fd);
+ _dbus_warn ("Bad fd %d", fd);
break;
case ENOENT:
- _dbus_warn ("fd %d enabled before it was added\n", fd);
+ _dbus_warn ("fd %d enabled before it was added", fd);
break;
case ENOMEM:
- _dbus_warn ("Insufficient memory to change watch for fd %d\n", fd);
+ _dbus_warn ("Insufficient memory to change watch for fd %d", fd);
break;
default:
- _dbus_warn ("Misc error when trying to watch fd %d: %s\n", fd,
+ _dbus_warn ("Misc error when trying to watch fd %d: %s", fd,
strerror (err));
break;
}
return;
err = errno;
- _dbus_warn ("Error when trying to watch fd %d: %s\n", fd,
+ _dbus_warn ("Error when trying to watch fd %d: %s", fd,
strerror (err));
}
return;
err = errno;
- _dbus_warn ("Error when trying to remove fd %d: %s\n", fd, strerror (err));
+ _dbus_warn ("Error when trying to remove fd %d: %s", fd, strerror (err));
}
/* Optimally, this should be the same as in DBusLoop: we use it to translate
if (!dbus_error_is_set (&error))
{
- _dbus_warn ("Did not get an error launching nonexistent executable\n");
+ _dbus_warn ("Did not get an error launching nonexistent executable");
return FALSE;
}
if (!(dbus_error_has_name (&error, DBUS_ERROR_NO_MEMORY) ||
dbus_error_has_name (&error, DBUS_ERROR_SPAWN_EXEC_FAILED)))
{
- _dbus_warn ("Not expecting error when launching nonexistent executable: %s: %s\n",
+ _dbus_warn ("Not expecting error when launching nonexistent executable: %s: %s",
error.name, error.message);
dbus_error_free (&error);
return FALSE;
if (!dbus_error_is_set (&error))
{
- _dbus_warn ("Did not get an error launching segfaulting binary\n");
+ _dbus_warn ("Did not get an error launching segfaulting binary");
return FALSE;
}
dbus_error_has_name (&error, DBUS_ERROR_SPAWN_CHILD_SIGNALED)))
#endif
{
- _dbus_warn ("Not expecting error when launching segfaulting executable: %s: %s\n",
+ _dbus_warn ("Not expecting error when launching segfaulting executable: %s: %s",
error.name, error.message);
dbus_error_free (&error);
return FALSE;
if (!dbus_error_is_set (&error))
{
- _dbus_warn ("Did not get an error launching binary that exited with failure code\n");
+ _dbus_warn ("Did not get an error launching binary that exited with failure code");
return FALSE;
}
if (!(dbus_error_has_name (&error, DBUS_ERROR_NO_MEMORY) ||
dbus_error_has_name (&error, DBUS_ERROR_SPAWN_CHILD_EXITED)))
{
- _dbus_warn ("Not expecting error when launching exiting executable: %s: %s\n",
+ _dbus_warn ("Not expecting error when launching exiting executable: %s: %s",
error.name, error.message);
dbus_error_free (&error);
return FALSE;
if (!dbus_error_is_set (&error))
{
- _dbus_warn ("Did not get an error after killing spawned binary\n");
+ _dbus_warn ("Did not get an error after killing spawned binary");
return FALSE;
}
dbus_error_has_name (&error, DBUS_ERROR_SPAWN_CHILD_SIGNALED)))
#endif
{
- _dbus_warn ("Not expecting error when killing executable: %s: %s\n",
+ _dbus_warn ("Not expecting error when killing executable: %s: %s",
error.name, error.message);
dbus_error_free (&error);
return FALSE;
if (ret < 0)
{
if (errno == ECHILD)
- _dbus_warn ("Babysitter process not available to be reaped; should not happen\n");
+ _dbus_warn ("Babysitter process not available to be reaped; should not happen");
else
- _dbus_warn ("Unexpected error %d in waitpid() for babysitter: %s\n",
+ _dbus_warn ("Unexpected error %d in waitpid() for babysitter: %s",
errno, _dbus_strerror (errno));
}
else
switch (r)
{
case READ_STATUS_ERROR:
- _dbus_warn ("Failed to read data from fd %d: %s\n", fd, error.message);
+ _dbus_warn ("Failed to read data from fd %d: %s", fd, error.message);
dbus_error_free (&error);
return r;
switch (r)
{
case READ_STATUS_ERROR:
- _dbus_warn ("Failed to read arg from fd %d: %s\n", fd, error.message);
+ _dbus_warn ("Failed to read arg from fd %d: %s", fd, error.message);
dbus_error_free (&error);
return r;
case READ_STATUS_EOF:
switch (r)
{
case READ_STATUS_ERROR:
- _dbus_warn ("Failed to read PID from fd %d: %s\n", fd, error.message);
+ _dbus_warn ("Failed to read PID from fd %d: %s", fd, error.message);
dbus_error_free (&error);
return r;
case READ_STATUS_EOF:
}
break;
default:
- _dbus_warn ("Unknown message received from babysitter process\n");
+ _dbus_warn ("Unknown message received from babysitter process");
break;
}
}
goto again;
else
{
- _dbus_warn ("Failed to write data to pipe!\n");
+ _dbus_warn ("Failed to write data to pipe!");
exit (1); /* give up, we suck */
}
}
retval = fcntl (i, F_GETFD);
if (retval != -1 && !(retval & FD_CLOEXEC))
- _dbus_warn ("Fd %d did not have the close-on-exec flag set!\n", i);
+ _dbus_warn ("Fd %d did not have the close-on-exec flag set!", i);
}
#endif
else if (ret < 0)
{
/* This isn't supposed to happen. */
- _dbus_warn ("unexpected waitpid() failure in check_babysit_events(): %s\n",
+ _dbus_warn ("unexpected waitpid() failure in check_babysit_events(): %s",
_dbus_strerror (errno));
exit (1);
}
}
else
{
- _dbus_warn ("waitpid() reaped pid %d that we've never heard of\n",
+ _dbus_warn ("waitpid() reaped pid %d that we've never heard of",
(int) ret);
exit (1);
}
*/
if (pipe (sigchld_pipe) < 0)
{
- _dbus_warn ("Not enough file descriptors to create pipe in babysitter process\n");
+ _dbus_warn ("Not enough file descriptors to create pipe in babysitter process");
exit (1);
}
if (_dbus_poll (pfds, _DBUS_N_ELEMENTS (pfds), -1) < 0 && errno != EINTR)
{
- _dbus_warn ("_dbus_poll() error: %s\n", strerror (errno));
+ _dbus_warn ("_dbus_poll() error: %s", strerror (errno));
exit (1);
}
if (fd >= 0)
{
if (write (fd, "0", sizeof (char)) < 0)
- _dbus_warn ("writing oom_score_adj error: %s\n", strerror (errno));
+ _dbus_warn ("writing oom_score_adj error: %s", strerror (errno));
_dbus_close (fd, NULL);
}
#endif
#define PTHREAD_CHECK(func_name, result_or_call) do { \
int tmp = (result_or_call); \
if (tmp != 0) { \
- _dbus_warn_check_failed ("pthread function %s failed with %d %s in %s\n", \
+ _dbus_warn_check_failed ("pthread function %s failed with %d %s in %s", \
func_name, tmp, strerror(tmp), _DBUS_FUNCTION_NAME); \
} \
} while (0)
* and continue, maybe it will be good enough.
*/
if (!abstract && chmod (path, 0777) < 0)
- _dbus_warn ("Could not set mode 0777 on socket %s\n",
- path);
+ _dbus_warn ("Could not set mode 0777 on socket %s", path);
return listen_fd;
}
return TRUE;
#else
- _dbus_warn ("_dbus_socketpair() not implemented on this OS\n");
+ _dbus_warn ("_dbus_socketpair() not implemented on this OS");
dbus_set_error (error, DBUS_ERROR_FAILED,
"_dbus_socketpair() not implemented on this OS");
return FALSE;
static dbus_bool_t already_warned = FALSE;
if (!already_warned)
{
- _dbus_warn ("Using your real home directory for testing, set DBUS_TEST_HOMEDIR to avoid\n");
+ _dbus_warn ("Using your real home directory for testing, set DBUS_TEST_HOMEDIR to avoid");
already_warned = TRUE;
}
}
* is going to work then setgroups() should also work.
*/
if (setgroups (0, NULL) < 0)
- _dbus_warn ("Failed to drop supplementary groups: %s\n",
+ _dbus_warn ("Failed to drop supplementary groups: %s",
_dbus_strerror (errno));
/* Set GID first, or the setuid may remove our permission
if (!_dbus_string_equal_c_str (&d, dirname))
{
- _dbus_warn ("For filename \"%s\" got dirname \"%s\" and expected \"%s\"\n",
+ _dbus_warn ("For filename \"%s\" got dirname \"%s\" and expected \"%s\"",
filename,
_dbus_string_get_const_data (&d),
dirname);
if (_dbus_path_is_absolute (&p) != expected)
{
- _dbus_warn ("For path \"%s\" expected absolute = %d got %d\n",
+ _dbus_warn ("For path \"%s\" expected absolute = %d got %d",
path, expected, _dbus_path_is_absolute (&p));
exit (1);
}
if (!GetTempPathA (sizeof (buf), buf))
{
- _dbus_warn ("GetTempPath failed\n");
+ _dbus_warn ("GetTempPath failed");
_dbus_abort ();
}
static dbus_bool_t already_warned = FALSE;
if (!already_warned)
{
- _dbus_warn ("Using your real home directory for testing, set DBUS_TEST_HOMEDIR to avoid\n");
+ _dbus_warn ("Using your real home directory for testing, set DBUS_TEST_HOMEDIR to avoid");
already_warned = TRUE;
}
}
dbus_error_init (&error);
_dbus_win_set_error_from_win_error (&error, code);
- _dbus_warn ("%s: %s\n", message, error.message);
+ _dbus_warn ("%s: %s", message, error.message);
dbus_error_free (&error);
}
printf ("%s: checking for memleaks\n", "test-dbus");
if (_dbus_get_malloc_blocks_outstanding () != 0)
{
- _dbus_warn ("%d dbus_malloc blocks were not freed\n",
+ _dbus_warn ("%d dbus_malloc blocks were not freed",
_dbus_get_malloc_blocks_outstanding ());
die ("memleaks");
}
if (dbus_watch_get_socket (watch) < 0)
{
- _dbus_warn_check_failed ("Tried to handle an invalidated watch; this watch should have been removed\n");
+ _dbus_warn_check_failed ("Tried to handle an invalidated watch; this watch should have been removed");
return TRUE;
}
else
{
/* This really should not happen. */
- _dbus_warn ("Could not get password database information for UID of current process: %s\n",
+ _dbus_warn ("Could not get password database information for UID of current process: %s",
error.message);
dbus_error_free (&error);
return FALSE;
#ifndef DBUS_DISABLE_CHECKS
if (!_dbus_pollable_is_valid (watch->fd) || watch->flags == 0)
{
- _dbus_warn_check_failed ("Watch is invalid, it should have been removed\n");
+ _dbus_warn_check_failed ("Watch is invalid, it should have been removed");
return TRUE;
}
#endif