diff options
Diffstat (limited to 'src/libudev')
-rw-r--r-- | src/libudev/libudev-device-private.c | 4 | ||||
-rw-r--r-- | src/libudev/libudev-device.c | 10 | ||||
-rw-r--r-- | src/libudev/libudev-hwdb.c | 10 | ||||
-rw-r--r-- | src/libudev/libudev-monitor.c | 32 | ||||
-rw-r--r-- | src/libudev/libudev-util.c | 4 | ||||
-rw-r--r-- | src/libudev/libudev.c | 6 |
6 files changed, 33 insertions, 33 deletions
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; |