On Tue, 16.07.13 19:38, Tom Gundersen (t...@jklm.no) wrote: > - udev_enumerate_unref(e); > + /* udev exports "dead" device nodes to allow module on-demand > loading, > + * these devices are not known to the kernel at this moment */ > + dir = opendir("/run/udev/static_node-tags/uaccess"); > + if (dir) { > + for (dent = readdir(dir); dent != NULL; dent = > readdir(dir)) {
Please use FOREACH_DIRENT here! > + _cleanup_free_ char *unescaped_devname = NULL; > > + if (dent->d_name[0] == '.') > + continue; This is unnecessary if you use FOREACH_DIRENT. > + > + unescaped_devname = cunescape(dent->d_name); > + if (unescaped_devname == NULL) { > + r = -ENOMEM; > + closedir(dir); Looks like you want to use _cleanup_closedir_ for this? > + goto finish; > + } > + > + n = strappend("/dev/", unescaped_devname); Good candidate for strappenda? Lennart -- Lennart Poettering - Red Hat, Inc. _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel