diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2008-11-01 20:16:24 +0100 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2008-11-01 20:16:24 +0100 |
commit | 86b5778857522087e74182f26f0e565adea0c699 (patch) | |
tree | 227caf1374fa7b8aa03f91d06653031f266ed4fa /udev/lib | |
parent | 5755d586e17d7397ddf255e4483e01039cb38d1d (diff) |
move some info() to dbg()
Diffstat (limited to 'udev/lib')
-rw-r--r-- | udev/lib/libudev-ctrl.c | 4 | ||||
-rw-r--r-- | udev/lib/libudev-device.c | 32 | ||||
-rw-r--r-- | udev/lib/libudev-enumerate.c | 16 | ||||
-rw-r--r-- | udev/lib/libudev-list.c | 6 | ||||
-rw-r--r-- | udev/lib/libudev-monitor.c | 10 | ||||
-rw-r--r-- | udev/lib/libudev-queue.c | 18 | ||||
-rw-r--r-- | udev/lib/libudev-util.c | 2 | ||||
-rw-r--r-- | udev/lib/libudev.c | 14 |
8 files changed, 51 insertions, 51 deletions
diff --git a/udev/lib/libudev-ctrl.c b/udev/lib/libudev-ctrl.c index 2e15db0be0..caf0dc08a3 100644 --- a/udev/lib/libudev-ctrl.c +++ b/udev/lib/libudev-ctrl.c @@ -250,7 +250,7 @@ struct udev_ctrl_msg *udev_ctrl_receive_msg(struct udev_ctrl *uctrl) goto err; } - info(uctrl->udev, "created ctrl_msg %p (%i)\n", uctrl_msg, uctrl_msg->ctrl_msg_wire.type); + dbg(uctrl->udev, "created ctrl_msg %p (%i)\n", uctrl_msg, uctrl_msg->ctrl_msg_wire.type); return uctrl_msg; err: udev_ctrl_msg_unref(uctrl_msg); @@ -272,7 +272,7 @@ void udev_ctrl_msg_unref(struct udev_ctrl_msg *ctrl_msg) ctrl_msg->refcount--; if (ctrl_msg->refcount > 0) return; - info(ctrl_msg->uctrl->udev, "release ctrl_msg %p\n", ctrl_msg); + dbg(ctrl_msg->uctrl->udev, "release ctrl_msg %p\n", ctrl_msg); free(ctrl_msg); } diff --git a/udev/lib/libudev-device.c b/udev/lib/libudev-device.c index 3f8ee1071c..e9d040cdfc 100644 --- a/udev/lib/libudev-device.c +++ b/udev/lib/libudev-device.c @@ -87,7 +87,7 @@ int udev_device_read_db(struct udev_device *udev_device) devpath_to_db_path(udev_device->udev, udev_device->devpath, filename, sizeof(filename)); if (lstat(filename, &stats) != 0) { - info(udev_device->udev, "no db file to read %s: %m\n", filename); + dbg(udev_device->udev, "no db file to read %s: %m\n", filename); return -1; } if ((stats.st_mode & S_IFMT) == S_IFLNK) { @@ -100,7 +100,7 @@ int udev_device_read_db(struct udev_device *udev_device) if (target_len > 0) target[target_len] = '\0'; else { - info(udev_device->udev, "error reading db link %s: %m\n", filename); + dbg(udev_device->udev, "error reading db link %s: %m\n", filename); return -1; } @@ -134,7 +134,7 @@ int udev_device_read_db(struct udev_device *udev_device) f = fopen(filename, "r"); if (f == NULL) { - info(udev_device->udev, "error reading db file %s: %m\n", filename); + dbg(udev_device->udev, "error reading db file %s: %m\n", filename); return -1; } while (fgets(line, sizeof(line), f)) { @@ -252,7 +252,7 @@ struct udev_device *device_new(struct udev *udev) udev_device_add_property(udev_device, udev_list_entry_get_name(list_entry), udev_list_entry_get_value(list_entry)); - info(udev_device->udev, "udev_device: %p created\n", udev_device); + dbg(udev_device->udev, "udev_device: %p created\n", udev_device); return udev_device; } @@ -295,7 +295,7 @@ struct udev_device *udev_device_new_from_syspath(struct udev *udev, const char * subdir = &syspath[len+1]; pos = strrchr(subdir, '/'); if (pos == NULL || pos < &subdir[2]) { - info(udev, "not a subdir :%s\n", syspath); + dbg(udev, "not a subdir :%s\n", syspath); return NULL; } @@ -330,13 +330,13 @@ struct udev_device *udev_device_new_from_syspath(struct udev *udev, const char * util_strlcpy(file, path, sizeof(file)); util_strlcat(file, "/uevent", sizeof(file)); if (stat(file, &statbuf) != 0) { - info(udev, "not a device: %s\n", syspath); + dbg(udev, "not a device: %s\n", syspath); return NULL; } } else { /* everything else just needs to be a directory */ if (stat(path, &statbuf) != 0 || !S_ISDIR(statbuf.st_mode)) { - info(udev, "directory not found: %s\n", syspath); + dbg(udev, "directory not found: %s\n", syspath); return NULL; } } @@ -531,7 +531,7 @@ struct udev_device *udev_device_get_parent(struct udev_device *udev_device) udev_device->parent_device = device_new_from_parent(udev_device); } if (udev_device->parent_device != NULL) - info(udev_device->udev, "returning existing parent %p\n", udev_device->parent_device); + dbg(udev_device->udev, "returning existing parent %p\n", udev_device->parent_device); return udev_device->parent_device; } @@ -612,7 +612,7 @@ void udev_device_unref(struct udev_device *udev_device) udev_list_cleanup_entries(udev_device->udev, &udev_device->sysattr_list); free(udev_device->envp); free(udev_device->monitor_buf); - info(udev_device->udev, "udev_device: %p released\n", udev_device); + dbg(udev_device->udev, "udev_device: %p released\n", udev_device); free(udev_device); } @@ -840,8 +840,8 @@ const char *udev_device_get_sysattr_value(struct udev_device *udev_device, const /* look for possibly already cached result */ udev_list_entry_foreach(list_entry, udev_list_get_entry(&udev_device->sysattr_list)) { if (strcmp(udev_list_entry_get_name(list_entry), sysattr) == 0) { - info(udev_device->udev, "got '%s' (%s) from cache\n", - sysattr, udev_list_entry_get_value(list_entry)); + dbg(udev_device->udev, "got '%s' (%s) from cache\n", + sysattr, udev_list_entry_get_value(list_entry)); return udev_list_entry_get_value(list_entry); } } @@ -851,7 +851,7 @@ const char *udev_device_get_sysattr_value(struct udev_device *udev_device, const util_strlcat(path, sysattr, sizeof(path)); if (lstat(path, &statbuf) != 0) { - info(udev_device->udev, "no attribute '%s', keep negative entry\n", path); + dbg(udev_device->udev, "no attribute '%s', keep negative entry\n", path); udev_list_entry_add(udev_device->udev, &udev_device->sysattr_list, sysattr, NULL, 0, 0); goto out; } @@ -868,7 +868,7 @@ const char *udev_device_get_sysattr_value(struct udev_device *udev_device, const pos = strrchr(target, '/'); if (pos != NULL) { pos = &pos[1]; - info(udev_device->udev, "cache '%s' with link value '%s'\n", sysattr, pos); + dbg(udev_device->udev, "cache '%s' with link value '%s'\n", sysattr, pos); list_entry = udev_list_entry_add(udev_device->udev, &udev_device->sysattr_list, sysattr, pos, 0, 0); val = udev_list_entry_get_value(list_entry); } @@ -887,7 +887,7 @@ const char *udev_device_get_sysattr_value(struct udev_device *udev_device, const /* read attribute value */ fd = open(path, O_RDONLY); if (fd < 0) { - info(udev_device->udev, "attribute '%s' can not be opened\n", path); + dbg(udev_device->udev, "attribute '%s' can not be opened\n", path); goto out; } size = read(fd, value, sizeof(value)); @@ -900,7 +900,7 @@ const char *udev_device_get_sysattr_value(struct udev_device *udev_device, const /* got a valid value, store it in cache and return it */ value[size] = '\0'; util_remove_trailing_chars(value, '\n'); - info(udev_device->udev, "'%s' has attribute value '%s'\n", path, value); + dbg(udev_device->udev, "'%s' has attribute value '%s'\n", path, value); list_entry = udev_list_entry_add(udev_device->udev, &udev_device->sysattr_list, sysattr, value, 0, 0); val = udev_list_entry_get_value(list_entry); out: @@ -1072,7 +1072,7 @@ static int update_envp_monitor_buf(struct udev_device *udev_device) udev_device->envp[i] = NULL; udev_device->monitor_buf_len = bufpos; udev_device->envp_uptodate = 1; - info(udev_device->udev, "filled envp/monitor buffer, %u properties, %zu bytes\n", i, bufpos); + dbg(udev_device->udev, "filled envp/monitor buffer, %u properties, %zu bytes\n", i, bufpos); return 0; } diff --git a/udev/lib/libudev-enumerate.c b/udev/lib/libudev-enumerate.c index e5a4ccee3b..1b40d63484 100644 --- a/udev/lib/libudev-enumerate.c +++ b/udev/lib/libudev-enumerate.c @@ -310,7 +310,7 @@ static int devices_delay(struct udev *udev, const char *syspath) len = strlen(udev_get_sys_path(udev)); for (i = 0; delay_device_list[i] != NULL; i++) { if (strstr(&syspath[len], delay_device_list[i]) != NULL) { - info(udev, "delaying: %s\n", syspath); + dbg(udev, "delaying: %s\n", syspath); return 1; } } @@ -368,23 +368,23 @@ int udev_enumerate_scan_devices(struct udev_enumerate *udev_enumerate) util_strlcat(base, "/subsystem", sizeof(base)); if (stat(base, &statbuf) == 0) { /* we have /subsystem/, forget all the old stuff */ - info(udev, "searching '/subsystem/*/devices/*' dir\n"); + dbg(udev, "searching '/subsystem/*/devices/*' dir\n"); scan_dir(udev_enumerate, "subsystem", "devices", NULL); } else { - info(udev, "searching '/bus/*/devices/*' dir\n"); + dbg(udev, "searching '/bus/*/devices/*' dir\n"); scan_dir(udev_enumerate, "bus", "devices", NULL); - info(udev, "searching '/class/*' dir\n"); + dbg(udev, "searching '/class/*' dir\n"); scan_dir(udev_enumerate, "class", NULL, NULL); /* if block isn't a class, scan /block/ */ util_strlcpy(base, udev_get_sys_path(udev), sizeof(base)); util_strlcat(base, "/class/block", sizeof(base)); if (stat(base, &statbuf) != 0) { if (match_subsystem(udev_enumerate, "block")) { - info(udev, "searching '/block/*' dir\n"); + dbg(udev, "searching '/block/*' dir\n"); /* scan disks */ scan_dir_and_add_devices(udev_enumerate, "block", NULL, NULL); /* scan partitions */ - info(udev, "searching '/block/*/*' dir\n"); + dbg(udev, "searching '/block/*/*' dir\n"); scan_dir(udev_enumerate, "block", NULL, "block"); } } @@ -419,11 +419,11 @@ int udev_enumerate_scan_subsystems(struct udev_enumerate *udev_enumerate) else subsysdir = "bus"; if (match_subsystem(udev_enumerate, "subsystem")) { - info(udev, "searching '%s/*' dir\n", subsysdir); + dbg(udev, "searching '%s/*' dir\n", subsysdir); scan_dir_and_add_devices(udev_enumerate, subsysdir, NULL, NULL); } if (match_subsystem(udev_enumerate, "drivers")) { - info(udev, "searching '%s/*/drivers/*' dir\n", subsysdir); + dbg(udev, "searching '%s/*/drivers/*' dir\n", subsysdir); scan_dir(udev_enumerate, subsysdir, "drivers", "drivers"); } return 0; diff --git a/udev/lib/libudev-list.c b/udev/lib/libudev-list.c index f205c61a70..e681e23e84 100644 --- a/udev/lib/libudev-list.c +++ b/udev/lib/libudev-list.c @@ -110,17 +110,17 @@ struct udev_list_entry *udev_list_entry_add(struct udev *udev, struct udev_list_ if (unique) udev_list_entry_foreach(entry_loop, udev_list_get_entry(list)) { if (strcmp(entry_loop->name, name) == 0) { - info(udev, "'%s' is already in the list\n", name); + dbg(udev, "'%s' is already in the list\n", name); free(entry_loop->value); if (value == NULL) { entry_loop->value = NULL; - info(udev, "'%s' value unset\n", name); + dbg(udev, "'%s' value unset\n", name); return entry_loop; } entry_loop->value = strdup(value); if (entry_loop->value == NULL) return NULL; - info(udev, "'%s' value replaced with '%s'\n", name, value); + dbg(udev, "'%s' value replaced with '%s'\n", name, value); return entry_loop; } } diff --git a/udev/lib/libudev-monitor.c b/udev/lib/libudev-monitor.c index fc5b176be0..502fe24ce1 100644 --- a/udev/lib/libudev-monitor.c +++ b/udev/lib/libudev-monitor.c @@ -94,7 +94,7 @@ struct udev_monitor *udev_monitor_new_from_socket(struct udev *udev, const char free(udev_monitor); return NULL; } - info(udev, "monitor %p created with '%s'\n", udev_monitor, socket_path); + dbg(udev, "monitor %p created with '%s'\n", udev_monitor, socket_path); return udev_monitor; } @@ -121,7 +121,7 @@ struct udev_monitor *udev_monitor_new_from_netlink(struct udev *udev) udev_monitor->snl.nl_pid = getpid(); udev_monitor->snl.nl_groups = 1; - info(udev, "monitor %p created with NETLINK_KOBJECT_UEVENT\n", udev_monitor); + dbg(udev, "monitor %p created with NETLINK_KOBJECT_UEVENT\n", udev_monitor); return udev_monitor; } @@ -136,7 +136,7 @@ int udev_monitor_enable_receiving(struct udev_monitor *udev_monitor) err(udev_monitor->udev, "bind failed: %m\n"); return err; } - info(udev_monitor->udev, "monitor %p listening on netlink\n", udev_monitor); + dbg(udev_monitor->udev, "monitor %p listening on netlink\n", udev_monitor); } else if (udev_monitor->sun.sun_family != 0) { err = bind(udev_monitor->sock, (struct sockaddr *)&udev_monitor->sun, udev_monitor->addrlen); if (err < 0) { @@ -145,7 +145,7 @@ int udev_monitor_enable_receiving(struct udev_monitor *udev_monitor) } /* enable receiving of the sender credentials */ setsockopt(udev_monitor->sock, SOL_SOCKET, SO_PASSCRED, &on, sizeof(on)); - info(udev_monitor->udev, "monitor %p listening on socket\n", udev_monitor); + dbg(udev_monitor->udev, "monitor %p listening on socket\n", udev_monitor); } return 0; } @@ -191,7 +191,7 @@ void udev_monitor_unref(struct udev_monitor *udev_monitor) return; if (udev_monitor->sock >= 0) close(udev_monitor->sock); - info(udev_monitor->udev, "monitor %p released\n", udev_monitor); + dbg(udev_monitor->udev, "monitor %p released\n", udev_monitor); free(udev_monitor); } diff --git a/udev/lib/libudev-queue.c b/udev/lib/libudev-queue.c index ea75f22044..28d877749d 100644 --- a/udev/lib/libudev-queue.c +++ b/udev/lib/libudev-queue.c @@ -103,7 +103,7 @@ unsigned long long int udev_queue_get_kernel_seqnum(struct udev_queue *udev_queu return 0; buf[len-1] = '\0'; seqnum = strtoull(buf, NULL, 10); - info(udev_queue->udev, "seqnum=%llu\n", seqnum); + dbg(udev_queue->udev, "seqnum=%llu\n", seqnum); return seqnum; } @@ -128,7 +128,7 @@ unsigned long long int udev_queue_get_udev_seqnum(struct udev_queue *udev_queue) return 0; buf[len-1] = '\0'; seqnum = strtoull(buf, NULL, 10); - info(udev_queue->udev, "seqnum=%llu\n", seqnum); + dbg(udev_queue->udev, "seqnum=%llu\n", seqnum); udev_queue->last_seen_udev_seqnum = seqnum; return seqnum; } @@ -144,20 +144,20 @@ int udev_queue_get_queue_is_empty(struct udev_queue *udev_queue) util_strlcpy(queuename, udev_get_dev_path(udev_queue->udev), sizeof(queuename)); util_strlcat(queuename, "/.udev/queue", sizeof(queuename)); if (stat(queuename, &statbuf) == 0) { - info(udev_queue->udev, "queue is not empty\n"); + dbg(udev_queue->udev, "queue is not empty\n"); return 0; } seqnum_kernel = udev_queue_get_kernel_seqnum(udev_queue); if (seqnum_kernel <= udev_queue->last_seen_udev_seqnum) { - info(udev_queue->udev, "queue is empty\n"); + dbg(udev_queue->udev, "queue is empty\n"); return 1; } udev_queue_get_udev_seqnum(udev_queue); if (seqnum_kernel <= udev_queue->last_seen_udev_seqnum) { - info(udev_queue->udev, "queue is empty\n"); + dbg(udev_queue->udev, "queue is empty\n"); return 1; } - info(udev_queue->udev, "queue is empty, but kernel events still pending [%llu]<->[%llu]\n", + dbg(udev_queue->udev, "queue is empty, but kernel events still pending [%llu]<->[%llu]\n", seqnum_kernel, udev_queue->last_seen_udev_seqnum); return 0; } @@ -179,7 +179,7 @@ int udev_queue_get_seqnum_is_finished(struct udev_queue *udev_queue, unsigned lo udev_get_dev_path(udev_queue->udev), seqnum); if (stat(filename, &statbuf) == 0) return 0; - info(udev_queue->udev, "seqnum: %llu finished\n", seqnum); + dbg(udev_queue->udev, "seqnum: %llu finished\n", seqnum); return 1; } @@ -214,7 +214,7 @@ struct udev_list_entry *udev_queue_get_queued_list_entry(struct udev_queue *udev if (len < 0 || len >= (ssize_t)(sizeof(syspath)-syslen)) continue; syspath[syslen + len] = '\0'; - info(udev_queue->udev, "found '%s' [%s]\n", syspath, dent->d_name); + dbg(udev_queue->udev, "found '%s' [%s]\n", syspath, dent->d_name); udev_list_entry_add(udev_queue->udev, &udev_queue->queue_list, syspath, dent->d_name, 0, 0); } closedir(dir); @@ -253,7 +253,7 @@ struct udev_list_entry *udev_queue_get_failed_list_entry(struct udev_queue *udev if (len < 0 || len >= (ssize_t)(sizeof(syspath)-syslen)) continue; syspath[syslen + len] = '\0'; - info(udev_queue->udev, "found '%s' [%s]\n", syspath, dent->d_name); + dbg(udev_queue->udev, "found '%s' [%s]\n", syspath, dent->d_name); util_strlcpy(filename, syspath, sizeof(filename)); util_strlcat(filename, "/uevent", sizeof(filename)); if (stat(filename, &statbuf) != 0) diff --git a/udev/lib/libudev-util.c b/udev/lib/libudev-util.c index 6586d1c825..9353e8eda7 100644 --- a/udev/lib/libudev-util.c +++ b/udev/lib/libudev-util.c @@ -48,7 +48,7 @@ static ssize_t get_sys_link(struct udev *udev, const char *slink, const char *sy if (pos == NULL) return -1; pos = &pos[1]; - info(udev, "resolved link to: '%s'\n", pos); + dbg(udev, "resolved link to: '%s'\n", pos); return util_strlcpy(value, pos, size); } diff --git a/udev/lib/libudev.c b/udev/lib/libudev.c index e26e8b132d..f427151f40 100644 --- a/udev/lib/libudev.c +++ b/udev/lib/libudev.c @@ -230,13 +230,13 @@ struct udev *udev_new(void) if (udev->dev_path == NULL || udev->sys_path == NULL) goto err; - info(udev, "context %p created\n", udev); - info(udev, "log_priority=%d\n", udev->log_priority); - info(udev, "config_file='%s'\n", config_file); - info(udev, "dev_path='%s'\n", udev->dev_path); - info(udev, "sys_path='%s'\n", udev->sys_path); + dbg(udev, "context %p created\n", udev); + dbg(udev, "log_priority=%d\n", udev->log_priority); + dbg(udev, "config_file='%s'\n", config_file); + dbg(udev, "dev_path='%s'\n", udev->dev_path); + dbg(udev, "sys_path='%s'\n", udev->sys_path); if (udev->rules_path != NULL) - info(udev, "rules_path='%s'\n", udev->rules_path); + dbg(udev, "rules_path='%s'\n", udev->rules_path); free(config_file); return udev; err: @@ -281,7 +281,7 @@ void udev_unref(struct udev *udev) free(udev->dev_path); free(udev->sys_path); free(udev->rules_path); - info(udev, "context %p released\n", udev); + dbg(udev, "context %p released\n", udev); free(udev); } |