summaryrefslogtreecommitdiff
path: root/device.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-04-15 06:19:54 +0200
committerLennart Poettering <lennart@poettering.net>2010-04-15 06:20:00 +0200
commit4f2d528d3bb25cebf8d3ebe83d8193ab4016cb90 (patch)
tree96336ea5c252c903ab4666d49714ececf949dfdf /device.c
parent9e2f7c11fb6ba35ffec2274da3e2d08b10d23965 (diff)
socket: optionally call accept() for incoming connections and spawn one service instance per connection
Diffstat (limited to 'device.c')
-rw-r--r--device.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/device.c b/device.c
index 1c4c32931c..1a4edd29a7 100644
--- a/device.c
+++ b/device.c
@@ -415,21 +415,21 @@ static int device_enumerate(Manager *m) {
if (epoll_ctl(m->epoll_fd, EPOLL_CTL_ADD, m->udev_watch.fd, &ev) < 0)
return -errno;
- /* if (!(e = udev_enumerate_new(m->udev))) { */
- /* r = -ENOMEM; */
- /* goto fail; */
- /* } */
+ if (!(e = udev_enumerate_new(m->udev))) {
+ r = -ENOMEM;
+ goto fail;
+ }
- /* if (udev_enumerate_scan_devices(e) < 0) { */
- /* r = -EIO; */
- /* goto fail; */
- /* } */
+ if (udev_enumerate_scan_devices(e) < 0) {
+ r = -EIO;
+ goto fail;
+ }
- /* first = udev_enumerate_get_list_entry(e); */
- /* udev_list_entry_foreach(item, first) */
- /* device_process_path(m, udev_list_entry_get_name(item), false); */
+ first = udev_enumerate_get_list_entry(e);
+ udev_list_entry_foreach(item, first)
+ device_process_path(m, udev_list_entry_get_name(item), false);
- /* udev_enumerate_unref(e); */
+ udev_enumerate_unref(e);
return 0;
fail: