summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libsystemd/sd-resolve/test-resolve.c16
-rw-r--r--src/libudev/libudev-device-private.c4
-rw-r--r--src/libudev/libudev-device.c10
-rw-r--r--src/libudev/libudev-hwdb.c10
-rw-r--r--src/libudev/libudev-monitor.c32
-rw-r--r--src/libudev/libudev-util.c4
-rw-r--r--src/libudev/libudev.c6
-rw-r--r--src/locale/localectl.c4
-rw-r--r--src/timesync/timesyncd-manager.c4
-rw-r--r--src/udev/udev-event.c2
-rw-r--r--src/udev/udev-rules.c18
-rw-r--r--src/udev/udevd.c2
12 files changed, 56 insertions, 56 deletions
diff --git a/src/libsystemd/sd-resolve/test-resolve.c b/src/libsystemd/sd-resolve/test-resolve.c
index c6c3bfb0ea..b7f8640231 100644
--- a/src/libsystemd/sd-resolve/test-resolve.c
+++ b/src/libsystemd/sd-resolve/test-resolve.c
@@ -43,7 +43,7 @@ static int getaddrinfo_handler(sd_resolve_query *q, int ret, const struct addrin
assert(q);
if (ret != 0) {
- log_error("getaddrinfo error: %s %i\n", gai_strerror(ret), ret);
+ log_error("getaddrinfo error: %s %i", gai_strerror(ret), ret);
return 0;
}
@@ -63,7 +63,7 @@ static int getnameinfo_handler(sd_resolve_query *q, int ret, const char *host, c
assert(q);
if (ret != 0) {
- log_error("getnameinfo error: %s %i\n", gai_strerror(ret), ret);
+ log_error("getnameinfo error: %s %i", gai_strerror(ret), ret);
return 0;
}
@@ -80,12 +80,12 @@ static int res_handler(sd_resolve_query *q, int ret, unsigned char *answer, void
assert(q);
if (ret < 0) {
- log_error("res_query() error: %s %i\n", strerror(errno), errno);
+ log_error("res_query() error: %s %i", strerror(errno), errno);
return 0;
}
if (ret == 0) {
- log_error("No reply for SRV lookup\n");
+ log_error("No reply for SRV lookup");
return 0;
}
@@ -146,18 +146,18 @@ int main(int argc, char *argv[]) {
/* Make a name -> address query */
r = sd_resolve_getaddrinfo(resolve, &q1, argc >= 2 ? argv[1] : "www.heise.de", NULL, &hints, getaddrinfo_handler, NULL);
if (r < 0)
- log_error("sd_resolve_getaddrinfo(): %s\n", strerror(-r));
+ log_error("sd_resolve_getaddrinfo(): %s", strerror(-r));
/* Make an address -> name query */
sa.sin_addr.s_addr = inet_addr(argc >= 3 ? argv[2] : "193.99.144.71");
r = sd_resolve_getnameinfo(resolve, &q2, (struct sockaddr*) &sa, sizeof(sa), 0, SD_RESOLVE_GET_BOTH, getnameinfo_handler, NULL);
if (r < 0)
- log_error("sd_resolve_getnameinfo(): %s\n", strerror(-r));
+ log_error("sd_resolve_getnameinfo(): %s", strerror(-r));
/* Make a res_query() call */
r = sd_resolve_res_query(resolve, &q3, "_xmpp-client._tcp.gmail.com", C_IN, T_SRV, res_handler, NULL);
if (r < 0)
- log_error("sd_resolve_res_query(): %s\n", strerror(-r));
+ log_error("sd_resolve_res_query(): %s", strerror(-r));
/* Wait until the three queries are completed */
while (sd_resolve_query_is_done(q1) == 0 ||
@@ -166,7 +166,7 @@ int main(int argc, char *argv[]) {
r = sd_resolve_wait(resolve, (uint64_t) -1);
if (r < 0) {
- log_error("sd_resolve_wait(): %s\n", strerror(-r));
+ log_error("sd_resolve_wait(): %s", strerror(-r));
assert_not_reached("sd_resolve_wait() failed");
}
}
diff --git a/src/libudev/libudev-device-private.c b/src/libudev/libudev-device-private.c
index df1fc0c9bf..aa3b2270e0 100644
--- a/src/libudev/libudev-device-private.c
+++ b/src/libudev/libudev-device-private.c
@@ -129,7 +129,7 @@ int udev_device_update_db(struct udev_device *udev_device)
mkdir_parents(filename_tmp, 0755);
f = fopen(filename_tmp, "we");
if (f == NULL) {
- log_debug("unable to create temporary db file '%s': %m\n", filename_tmp);
+ log_debug("unable to create temporary db file '%s': %m", filename_tmp);
return -errno;
}
@@ -171,7 +171,7 @@ int udev_device_update_db(struct udev_device *udev_device)
r = rename(filename_tmp, filename);
if (r < 0)
return -1;
- log_debug("created %s file '%s' for '%s'\n", has_info ? "db" : "empty",
+ log_debug("created %s file '%s' for '%s'", has_info ? "db" : "empty",
filename, udev_device_get_devpath(udev_device));
return 0;
}
diff --git a/src/libudev/libudev-device.c b/src/libudev/libudev-device.c
index 37e75d280f..fc7d928721 100644
--- a/src/libudev/libudev-device.c
+++ b/src/libudev/libudev-device.c
@@ -535,7 +535,7 @@ int udev_device_read_db(struct udev_device *udev_device, const char *dbfile)
f = fopen(dbfile, "re");
if (f == NULL) {
- log_debug("no db file to read %s: %m\n", dbfile);
+ log_debug("no db file to read %s: %m", dbfile);
return -errno;
}
@@ -577,7 +577,7 @@ int udev_device_read_db(struct udev_device *udev_device, const char *dbfile)
}
fclose(f);
- log_debug("device %p filled with db file data\n", udev_device);
+ log_debug("device %p filled with db file data", udev_device);
return 0;
}
@@ -699,7 +699,7 @@ _public_ struct udev_device *udev_device_new_from_syspath(struct udev *udev, con
/* path starts in sys */
if (!startswith(syspath, "/sys")) {
- log_debug("not in sys :%s\n", syspath);
+ log_debug("not in sys :%s", syspath);
errno = EINVAL;
return NULL;
}
@@ -734,7 +734,7 @@ _public_ struct udev_device *udev_device_new_from_syspath(struct udev *udev, con
return NULL;
udev_device_set_syspath(udev_device, path);
- log_debug("device %p has devpath '%s'\n", udev_device, udev_device_get_devpath(udev_device));
+ log_debug("device %p has devpath '%s'", udev_device, udev_device_get_devpath(udev_device));
return udev_device;
}
@@ -966,7 +966,7 @@ _public_ struct udev_device *udev_device_new_from_environment(struct udev *udev)
udev_device_add_property_from_string_parse(udev_device, environ[i]);
if (udev_device_add_property_from_string_parse_finish(udev_device) < 0) {
- log_debug("missing values, invalid device\n");
+ log_debug("missing values, invalid device");
udev_device_unref(udev_device);
udev_device = NULL;
}
diff --git a/src/libudev/libudev-hwdb.c b/src/libudev/libudev-hwdb.c
index 5ab821f626..1d0d407208 100644
--- a/src/libudev/libudev-hwdb.c
+++ b/src/libudev/libudev-hwdb.c
@@ -322,12 +322,12 @@ _public_ struct udev_hwdb *udev_hwdb_new(struct udev *udev) {
return NULL;
}
- log_debug("=== trie on-disk ===\n");
+ log_debug("=== trie on-disk ===");
log_debug("tool version: %"PRIu64, le64toh(hwdb->head->tool_version));
- log_debug("file size: %8"PRIu64" bytes\n", hwdb->st.st_size);
- log_debug("header size %8"PRIu64" bytes\n", le64toh(hwdb->head->header_size));
- log_debug("strings %8"PRIu64" bytes\n", le64toh(hwdb->head->strings_len));
- log_debug("nodes %8"PRIu64" bytes\n", le64toh(hwdb->head->nodes_len));
+ log_debug("file size: %8"PRIu64" bytes", hwdb->st.st_size);
+ log_debug("header size %8"PRIu64" bytes", le64toh(hwdb->head->header_size));
+ log_debug("strings %8"PRIu64" bytes", le64toh(hwdb->head->strings_len));
+ log_debug("nodes %8"PRIu64" bytes", le64toh(hwdb->head->nodes_len));
return hwdb;
}
diff --git a/src/libudev/libudev-monitor.c b/src/libudev/libudev-monitor.c
index 893ecb483e..bdb5516047 100644
--- a/src/libudev/libudev-monitor.c
+++ b/src/libudev/libudev-monitor.c
@@ -121,7 +121,7 @@ static bool udev_has_devtmpfs(struct udev *udev) {
r = name_to_handle_at(AT_FDCWD, "/dev", &h.handle, &mount_id, 0);
if (r < 0) {
if (errno != EOPNOTSUPP)
- log_debug("name_to_handle_at on /dev: %m\n");
+ log_debug("name_to_handle_at on /dev: %m");
return false;
}
@@ -174,7 +174,7 @@ struct udev_monitor *udev_monitor_new_from_netlink_fd(struct udev *udev, const c
* will not receive any messages.
*/
if (access("/run/udev/control", F_OK) < 0 && !udev_has_devtmpfs(udev)) {
- log_debug("the udev service seems not to be active, disable the monitor\n");
+ log_debug("the udev service seems not to be active, disable the monitor");
group = UDEV_MONITOR_NONE;
} else
group = UDEV_MONITOR_UDEV;
@@ -190,7 +190,7 @@ struct udev_monitor *udev_monitor_new_from_netlink_fd(struct udev *udev, const c
if (fd < 0) {
udev_monitor->sock = socket(PF_NETLINK, SOCK_RAW|SOCK_CLOEXEC|SOCK_NONBLOCK, NETLINK_KOBJECT_UEVENT);
if (udev_monitor->sock == -1) {
- log_debug("error getting socket: %m\n");
+ log_debug("error getting socket: %m");
free(udev_monitor);
return NULL;
}
@@ -407,14 +407,14 @@ _public_ int udev_monitor_enable_receiving(struct udev_monitor *udev_monitor)
if (err == 0)
udev_monitor->snl.nl.nl_pid = snl.nl.nl_pid;
} else {
- log_debug("bind failed: %m\n");
+ log_debug("bind failed: %m");
return -errno;
}
/* enable receiving of sender credentials */
err = setsockopt(udev_monitor->sock, SOL_SOCKET, SO_PASSCRED, &on, sizeof(on));
if (err < 0)
- log_debug("setting SO_PASSCRED failed: %m\n");
+ log_debug("setting SO_PASSCRED failed: %m");
return 0;
}
@@ -602,12 +602,12 @@ retry:
buflen = recvmsg(udev_monitor->sock, &smsg, 0);
if (buflen < 0) {
if (errno != EINTR)
- log_debug("unable to receive message\n");
+ log_debug("unable to receive message");
return NULL;
}
if (buflen < 32 || (size_t)buflen >= sizeof(buf)) {
- log_debug("invalid message length\n");
+ log_debug("invalid message length");
return NULL;
}
@@ -615,12 +615,12 @@ retry:
/* unicast message, check if we trust the sender */
if (udev_monitor->snl_trusted_sender.nl.nl_pid == 0 ||
snl.nl.nl_pid != udev_monitor->snl_trusted_sender.nl.nl_pid) {
- log_debug("unicast netlink message ignored\n");
+ log_debug("unicast netlink message ignored");
return NULL;
}
} else if (snl.nl.nl_groups == UDEV_MONITOR_KERNEL) {
if (snl.nl.nl_pid > 0) {
- log_debug("multicast kernel netlink message from pid %d ignored\n",
+ log_debug("multicast kernel netlink message from pid %d ignored",
snl.nl.nl_pid);
return NULL;
}
@@ -628,13 +628,13 @@ retry:
cmsg = CMSG_FIRSTHDR(&smsg);
if (cmsg == NULL || cmsg->cmsg_type != SCM_CREDENTIALS) {
- log_debug("no sender credentials received, message ignored\n");
+ log_debug("no sender credentials received, message ignored");
return NULL;
}
cred = (struct ucred *)CMSG_DATA(cmsg);
if (cred->uid != 0) {
- log_debug("sender uid=%d, message ignored\n", cred->uid);
+ log_debug("sender uid=%d, message ignored", cred->uid);
return NULL;
}
@@ -648,7 +648,7 @@ retry:
/* udev message needs proper version magic */
nlh = (struct udev_monitor_netlink_header *) buf;
if (nlh->magic != htonl(UDEV_MONITOR_MAGIC)) {
- log_debug("unrecognized message signature (%x != %x)\n",
+ log_debug("unrecognized message signature (%x != %x)",
nlh->magic, htonl(UDEV_MONITOR_MAGIC));
udev_device_unref(udev_device);
return NULL;
@@ -666,14 +666,14 @@ retry:
/* kernel message with header */
bufpos = strlen(buf) + 1;
if ((size_t)bufpos < sizeof("a@/d") || bufpos >= buflen) {
- log_debug("invalid message length\n");
+ log_debug("invalid message length");
udev_device_unref(udev_device);
return NULL;
}
/* check message header */
if (strstr(buf, "@/") == NULL) {
- log_debug("unrecognized message header\n");
+ log_debug("unrecognized message header");
udev_device_unref(udev_device);
return NULL;
}
@@ -694,7 +694,7 @@ retry:
}
if (udev_device_add_property_from_string_parse_finish(udev_device) < 0) {
- log_debug("missing values, invalid device\n");
+ log_debug("missing values, invalid device");
udev_device_unref(udev_device);
return NULL;
}
@@ -778,7 +778,7 @@ int udev_monitor_send_device(struct udev_monitor *udev_monitor,
smsg.msg_name = &udev_monitor->snl_destination;
smsg.msg_namelen = sizeof(struct sockaddr_nl);
count = sendmsg(udev_monitor->sock, &smsg, 0);
- log_debug("passed %zi bytes to netlink monitor %p\n", count, udev_monitor);
+ log_debug("passed %zi bytes to netlink monitor %p", count, udev_monitor);
return count;
}
diff --git a/src/libudev/libudev-util.c b/src/libudev/libudev-util.c
index 361c21f4c9..291829e6d8 100644
--- a/src/libudev/libudev-util.c
+++ b/src/libudev/libudev-util.c
@@ -93,7 +93,7 @@ int util_resolve_subsys_kernel(struct udev *udev, const char *string,
strscpy(result, maxsize, val);
else
result[0] = '\0';
- log_debug("value '[%s/%s]%s' is '%s'\n", subsys, sysname, attr, result);
+ log_debug("value '[%s/%s]%s' is '%s'", subsys, sysname, attr, result);
} else {
size_t l;
char *s;
@@ -102,7 +102,7 @@ int util_resolve_subsys_kernel(struct udev *udev, const char *string,
l = strpcpyl(&s, maxsize, udev_device_get_syspath(dev), NULL);
if (attr != NULL)
strpcpyl(&s, l, "/", attr, NULL);
- log_debug("path '[%s/%s]%s' is '%s'\n", subsys, sysname, attr, result);
+ log_debug("path '[%s/%s]%s' is '%s'", subsys, sysname, attr, result);
}
udev_device_unref(dev);
return 0;
diff --git a/src/libudev/libudev.c b/src/libudev/libudev.c
index c237db5e96..8785f22071 100644
--- a/src/libudev/libudev.c
+++ b/src/libudev/libudev.c
@@ -124,7 +124,7 @@ _public_ struct udev *udev_new(void) {
/* split key/value */
val = strchr(key, '=');
if (val == NULL) {
- log_debug("/etc/udev/udev.conf:%u: missing assignment, skipping line.\n", line_nr);
+ log_debug("/etc/udev/udev.conf:%u: missing assignment, skipping line.", line_nr);
continue;
}
val[0] = '\0';
@@ -156,7 +156,7 @@ _public_ struct udev *udev_new(void) {
/* unquote */
if (val[0] == '"' || val[0] == '\'') {
if (val[len-1] != val[0]) {
- log_debug("/etc/udev/udev.conf:%u: inconsistent quoting, skipping line.\n", line_nr);
+ log_debug("/etc/udev/udev.conf:%u: inconsistent quoting, skipping line.", line_nr);
continue;
}
val[len-1] = '\0';
@@ -168,7 +168,7 @@ _public_ struct udev *udev_new(void) {
prio = util_log_priority(val);
if (prio < 0)
- log_debug("/etc/udev/udev.conf:%u: invalid log level '%s', ignoring.\n", line_nr, val);
+ log_debug("/etc/udev/udev.conf:%u: invalid log level '%s', ignoring.", line_nr, val);
else
log_set_max_level(prio);
continue;
diff --git a/src/locale/localectl.c b/src/locale/localectl.c
index 333b458471..211808b03e 100644
--- a/src/locale/localectl.c
+++ b/src/locale/localectl.c
@@ -118,11 +118,11 @@ static void print_overriden_variables(void) {
if (variables[j]) {
if (print_warning) {
log_warning("Warning: Settings on kernel command line override system locale settings in /etc/locale.conf.\n"
- " Command Line: %s=%s\n", locale_variable_to_string(j), variables[j]);
+ " Command Line: %s=%s", locale_variable_to_string(j), variables[j]);
print_warning = false;
} else
- log_warning(" %s=%s\n", locale_variable_to_string(j), variables[j]);
+ log_warning(" %s=%s", locale_variable_to_string(j), variables[j]);
}
finish:
for (j = 0; j < _VARIABLE_LC_MAX; j++)
diff --git a/src/timesync/timesyncd-manager.c b/src/timesync/timesyncd-manager.c
index 8e4c0f3392..8559438157 100644
--- a/src/timesync/timesyncd-manager.c
+++ b/src/timesync/timesyncd-manager.c
@@ -353,7 +353,7 @@ static int manager_adjust_clock(Manager *m, double offset, int leap_sec) {
tmx.constant = log2i(m->poll_interval_usec / USEC_PER_SEC) - 4;
tmx.maxerror = 0;
tmx.esterror = 0;
- log_debug(" adjust (slew): %+.3f sec\n", offset);
+ log_debug(" adjust (slew): %+.3f sec", offset);
} else {
tmx.modes = ADJ_STATUS | ADJ_NANO | ADJ_SETOFFSET;
@@ -368,7 +368,7 @@ static int manager_adjust_clock(Manager *m, double offset, int leap_sec) {
}
m->jumped = true;
- log_debug(" adjust (jump): %+.3f sec\n", offset);
+ log_debug(" adjust (jump): %+.3f sec", offset);
}
/*
diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c
index 34f5348a2c..7799a20d20 100644
--- a/src/udev/udev-event.c
+++ b/src/udev/udev-event.c
@@ -781,7 +781,7 @@ static int rename_netif(struct udev_event *event) {
return r;
}
- log_debug("renamed network interface '%s' to '%s'\n", oldname, name);
+ log_debug("renamed network interface '%s' to '%s'", oldname, name);
return 0;
}
diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c
index eb56e270c1..37508fa0a8 100644
--- a/src/udev/udev-rules.c
+++ b/src/udev/udev-rules.c
@@ -474,9 +474,9 @@ static uid_t add_uid(struct udev_rules *rules, const char *owner) {
r = get_user_creds(&owner, &uid, NULL, NULL, NULL);
if (r < 0) {
if (r == -ENOENT || r == -ESRCH)
- log_error("specified user '%s' unknown\n", owner);
+ log_error("specified user '%s' unknown", owner);
else
- log_error("error resolving user '%s': %s\n", owner, strerror(-r));
+ log_error("error resolving user '%s': %s", owner, strerror(-r));
}
/* grow buffer if needed */
@@ -521,9 +521,9 @@ static gid_t add_gid(struct udev_rules *rules, const char *group) {
r = get_group_creds(&group, &gid);
if (r < 0) {
if (r == -ENOENT || r == -ESRCH)
- log_error("specified group '%s' unknown\n", group);
+ log_error("specified group '%s' unknown", group);
else
- log_error("error resolving group '%s': %s\n", group, strerror(-r));
+ log_error("error resolving group '%s': %s", group, strerror(-r));
}
/* grow buffer if needed */
@@ -1072,7 +1072,7 @@ static int add_rule(struct udev_rules *rules, char *line,
_cleanup_free_ char *tmp;
tmp = cescape(buf);
- log_error("invalid key/value pair in file %s on line %u, starting at character %tu ('%s')\n",
+ log_error("invalid key/value pair in file %s on line %u, starting at character %tu ('%s')",
filename, lineno, linepos - line + 1, tmp);
if (linepos[1] == '#')
log_error("hint: comments can only start at beginning of line");
@@ -2277,9 +2277,9 @@ int udev_rules_apply_to_event(struct udev_rules *rules,
r = get_user_creds(&ow, &event->uid, NULL, NULL, NULL);
if (r < 0) {
if (r == -ENOENT || r == -ESRCH)
- log_error("specified user '%s' unknown\n", owner);
+ log_error("specified user '%s' unknown", owner);
else
- log_error("error resolving user '%s': %s\n", owner, strerror(-r));
+ log_error("error resolving user '%s': %s", owner, strerror(-r));
event->uid = 0;
}
@@ -2303,9 +2303,9 @@ int udev_rules_apply_to_event(struct udev_rules *rules,
r = get_group_creds(&gr, &event->gid);
if (r < 0) {
if (r == -ENOENT || r == -ESRCH)
- log_error("specified group '%s' unknown\n", group);
+ log_error("specified group '%s' unknown", group);
else
- log_error("error resolving group '%s': %s\n", group, strerror(-r));
+ log_error("error resolving group '%s': %s", group, strerror(-r));
event->gid = 0;
}
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index d1cc7788bc..a6258e714a 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -1227,7 +1227,7 @@ int main(int argc, char *argv[]) {
udev_monitor_set_receive_buffer_size(monitor, 128 * 1024 * 1024);
- log_info("starting version " VERSION "\n");
+ log_info("starting version " VERSION);
udev_builtin_init(udev);